[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #64685] snmp traps build failure (dangling pointer)
From: |
Erik Ekman |
Subject: |
[lwip-devel] [bug #64685] snmp traps build failure (dangling pointer) |
Date: |
Sun, 17 Sep 2023 05:42:25 -0400 (EDT) |
URL:
<https://savannah.nongnu.org/bugs/?64685>
Summary: snmp traps build failure (dangling pointer)
Group: lwIP - A Lightweight TCP/IP stack
Submitter: yarrick
Submitted: Sun 17 Sep 2023 11:42:22 AM CEST
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: 2.1.3
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 17 Sep 2023 11:42:22 AM CEST By: Erik Ekman <yarrick>
When trying to build the fuzzer, I got this failure. Seems like it correctly
detected where a pointer is given the address of a struct from the stack.
This has likely been broken since being added in patch #15072 in 2018.
../../src/apps/snmp/snmp_traps.c: In function
‘snmp_send_trap_or_notification_or_inform_generic’:
../../src/apps/snmp/snmp_traps.c:401:24: error: storing the address of local
variable ‘snmp_v2_special_varbinds’ in ‘*varbinds.prev’
[-Werror=dangling-pointer=]
401 | varbinds->prev = &snmp_v2_special_varbinds[1];
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/apps/snmp/snmp_traps.c:356:23: note: ‘snmp_v2_special_varbinds’
declared here
356 | struct snmp_varbind snmp_v2_special_varbinds[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
../../src/apps/snmp/snmp_traps.c:347:176: note: ‘varbinds’ declared here
347 | snmp_send_trap_or_notification_or_inform_generic(struct snmp_msg_trap
*trap_msg, const struct snmp_obj_id *eoid, s32_t generic_trap, s32_t
specific_trap, struct snmp_varbind *varbinds)
|
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
cc1: all warnings being treated as errors
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?64685>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #64685] snmp traps build failure (dangling pointer),
Erik Ekman <=