mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 14:00:30 +00:00
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
Block a user