Merge branch 'master' into sprintf

This commit is contained in:
Jeremy Soller
2018-03-10 06:46:17 -07:00
committed by GitHub
4 changed files with 23 additions and 16 deletions
+1
View File
@@ -28,5 +28,6 @@
/setid
/sprintf
/stdlib/strtol
/string/strncmp
/unlink
/write
+2 -1
View File
@@ -22,7 +22,8 @@ BINS=\
setid \
sleep \
sprintf \
stdlib/strtol \
stdlib/strtol \
string/strncmp \
unlink \
write
+13
View File
@@ -0,0 +1,13 @@
#include <string.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
printf("%d\n", strncmp("a", "aa", 2));
printf("%d\n", strncmp("a", "", 2));
printf("%d\n", strncmp("\xFF", "\xFE", 2));
printf("%d\n", strncmp("", "\xFF", 1));
printf("%d\n", strncmp("a", "c", 1));
printf("%d\n", strncmp("a", "a", 2));
return 0;
}