diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2013-11-18 12:41:00 +0100 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2013-11-18 12:42:23 +0100 |
commit | 728dab0e13529ba8778e6ef07e2cc80eddf028b5 (patch) | |
tree | 390911e7cb25cd8ed168393f1e4d194596fa44c6 /stdio-common/tst-sscanf.c | |
parent | dd8082389e5448c3e716de8431817b30565a48d3 (diff) | |
download | glibc-728dab0e13529ba8778e6ef07e2cc80eddf028b5.tar.gz glibc-728dab0e13529ba8778e6ef07e2cc80eddf028b5.tar.xz glibc-728dab0e13529ba8778e6ef07e2cc80eddf028b5.zip |
Do not let scanf("%4p") accept "(nil)". Fixes bug 16055
Diffstat (limited to 'stdio-common/tst-sscanf.c')
-rw-r--r-- | stdio-common/tst-sscanf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c index 3c34f58a63..a77bc7e30b 100644 --- a/stdio-common/tst-sscanf.c +++ b/stdio-common/tst-sscanf.c @@ -92,6 +92,8 @@ struct test { L("foo bar"), L("foo bar"), 0 }, { L("foo bar"), L("foo %d"), 0 }, { L("foo bar"), L("foon%d"), 0 }, + { L("foo (nil)"), L("foo %p"), 1}, + { L("foo (nil)"), L("foo %4p"), 0}, { L("foo "), L("foo %n"), 0 }, { L("foo%bar1"), L("foo%%bar%d"), 1 }, /* Some OSes skip whitespace here while others don't. */ |