]> sourceware.org Git - systemtap.git/commit
PR11234: Ensure __get_argv doesn't overflow
authorJosh Stone <jistone@redhat.com>
Fri, 29 Jan 2010 05:00:58 +0000 (21:00 -0800)
committerJosh Stone <jistone@redhat.com>
Fri, 29 Jan 2010 05:00:58 +0000 (21:00 -0800)
commitf75409719f120a3dbee66d761cf23a64092d1414
treea35e8f9c3d1cf317b2a989df10e5835dcc461670
parent15b2e969f0f67b2259e0345a446001ac80179968
PR11234: Ensure __get_argv doesn't overflow

That function was calling strlcpy as if the return value was the number
of bytes copied, but strlcpy actually returns the length of the input
string.  We now use min() to handle the case when it's bigger than the
buffer length, and drop out of the loop when that happens.
tapset/aux_syscalls.stp
testsuite/systemtap.base/overflow-get_argv.exp [new file with mode: 0644]
testsuite/systemtap.base/overflow-get_argv.stp [new file with mode: 0644]
This page took 0.028361 seconds and 5 git commands to generate.