summaryrefslogtreecommitdiffstats
path: root/src/logging.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-01-08 19:20:02 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-12 13:48:59 +0000
commit1e50e2ad4813c037b0fbc5559381ec22776225d7 (patch)
tree389ada1e65127e552ef730f6d216280826760a8d /src/logging.c
parentffad574a4b68596d17671965bf145f11f0b00e57 (diff)
TLVP_PRESENT() should not return TRUE after tlv_parse() fails.
If the length provided in the patcket exceeds the buffer length, tlv_parse() returns -2 but leaves tlv.val and tlv.len initializd. Many callers of tlv_parse() do not check its return value, but rely on TLVP_PRESENT() to see if a particular TLV was parsed successfully. By clearing tlv.val and tlv.len we make it less likely that those callers will use an overlong TLV length value. Change-Id: I4dda6938e1650b4bcaac45809a4763f86f5a9794
Diffstat (limited to 'src/logging.c')
0 files changed, 0 insertions, 0 deletions