[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/glibc-2.22/stdio-common/bug10.c b/ap/libc/glibc/glibc-2.22/stdio-common/bug10.c
new file mode 100644
index 0000000..c4f328d
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/stdio-common/bug10.c
@@ -0,0 +1,25 @@
+#include <stdio.h>
+
+int
+main (int arc, char *argv[])
+{
+ int n, res;
+ unsigned int val;
+ char s[] = "111";
+ int result = 0;
+
+ n = 0;
+ res = sscanf(s, "%u %n", &val, &n);
+
+ printf("Result of sscanf = %d\n", res);
+ printf("Scanned format %%u = %u\n", val);
+ printf("Possibly scanned format %%n = %d\n", n);
+ result |= res != 1 || val != 111 || n != 3;
+
+
+ result |= sscanf ("", " %n", &n) == EOF;
+
+ puts (result ? "Test failed" : "All tests passed");
+
+ return result;
+}