mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 23:00:22 +00:00
Fail test if buffer too small.
This commit is contained in:
parent
c76a1727ad
commit
f0d4856381
@ -27,6 +27,12 @@ tst_strfmon (FILE * fp, int debug_flg)
|
||||
fmt = TST_INPUT (strfmon).fmt;
|
||||
val = TST_INPUT (strfmon).val;
|
||||
memset (buf, 0, MONSIZE);
|
||||
if (nbt > MONSIZE)
|
||||
{
|
||||
err_count++;
|
||||
Result (C_FAILURE, S_STRFMON, CASE_3, "buffer too small in test");
|
||||
continue;
|
||||
}
|
||||
|
||||
TST_CLEAR_ERRNO;
|
||||
ret = strfmon (buf, nbt, fmt, val, val, val);
|
||||
|
Loading…
Reference in New Issue
Block a user