Skip to content

Commit

Permalink
Ensure returned address is the one of a static variable
Browse files Browse the repository at this point in the history
In snmp.c, when returning the address of a variable, we must ensure the
variable is a static one so that its content is not erased when leaving
the function scope.
  • Loading branch information
vincentbernat committed Oct 29, 2016
1 parent eedab2a commit feb8308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dep/snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ snmpHeaderIndexBest(struct snmpHeaderIndex *idx)
Integer32 i32_ret; \
Integer64 bigint; \
struct snmpHeaderIndex idx; \
char tmpStr[64]; \
static char tmpStr[64]; \
(void)long_ret; \
(void)counter64_ret; \
(void)ipaddr; \
Expand Down

0 comments on commit feb8308

Please sign in to comment.