aboutsummaryrefslogtreecommitdiff
path: root/gl/asprintf.c
diff options
context:
space:
mode:
authorGravatar Robin Sonefors <robin.sonefors@op5.com> 2013-01-23 19:10:55 +0100
committerGravatar Sven Nierlein <sven@nierlein.de> 2013-01-23 19:52:24 +0100
commit77eba263610bb9f85fa9fadf0df39b15bc1919ff (patch)
treed5415131a0a989edad83195b666dcb0d77163036 /gl/asprintf.c
parent1845c4cdf98fe9cf4bc95b6e11ae94cec1dcd4cc (diff)
downloadmonitoring-plugins-77eba263610bb9f85fa9fadf0df39b15bc1919ff.tar.gz
check_snmp: Don't thrash memory when using multiple label/unit argument
The memory allocation mixed up number of bytes with number of pointers, meaning as soon as we'd reach (on 64 bit systems) the second argument, we'd start writing it outside of our allocated memory. Normally, this isn't too visible, but as soon as you (again, on my 64 bit system) reach argument number 8, you get a segfault. It is easily reproducible with: check_snmp -o '' -l '' -o '' -l '' -o '' -l '' -o '' -l '' \ -o '' -l '' -o '' -l '' -o '' -l '' -o '' -l '' This patch allocates the proper amount of memory, to fix the issue. Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
Diffstat (limited to 'gl/asprintf.c')
0 files changed, 0 insertions, 0 deletions