summaryrefslogtreecommitdiff
path: root/tests/lib/test_srcdest_table.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@cumulusnetworks.com>2018-07-26 16:12:05 -0400
committerStephen Worley <sworley@cumulusnetworks.com>2018-07-26 16:46:57 -0400
commite6a0e0d1413a2cfb17be8374d82a1db555fd5ec2 (patch)
treedb51b97daf5b53f3cc67f058dca21321c39cd23e /tests/lib/test_srcdest_table.c
parent4b22e6bc053fe6349960b279c5bfa47bbba04b56 (diff)
zebra: Check for netlink message next fault
NLMSG_NEXT decrements the buffer length (status) by the header msg length (nlmsg_len) everytime its called. If nlmsg_len isn't accurate and set to be larger than what it should represent, it will cause status to decrement passed 0. This makes NLMSG_NEXT return a pointer that references an inaccessible address. When that is passed to NLMSG_OK, it segfaults. Add a check to verify that there is still something to read before we try to. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Diffstat (limited to 'tests/lib/test_srcdest_table.c')
0 files changed, 0 insertions, 0 deletions