mirror of git://sourceware.org/git/glibc.git
String: Add three more overflow tests cases to test-strnlen.c
No bug. Just seem like relevant cases given that strnlen will use s + maxlen in many implementations. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
parent
9f70985569
commit
bd3a2b3ed1
|
@ -117,6 +117,10 @@ do_overflow_tests (void)
|
|||
do_test (0, i, ~len + i, BIG_CHAR);
|
||||
do_test (0, i, ~len - buf_addr - i, BIG_CHAR);
|
||||
do_test (0, i, ~len - buf_addr + i, BIG_CHAR);
|
||||
|
||||
do_test (0, i, -buf_addr, BIG_CHAR);
|
||||
do_test (0, i, j - buf_addr, BIG_CHAR);
|
||||
do_test (0, i, -buf_addr - j, BIG_CHAR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue