hexdump: accept hex numbers in -n, closes 16195
[busybox-git.git] / scripts / test_setenv_leak.c
blobe51722ca70aac3d0082d26848b3b6ced6d7f786b
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <unistd.h>
4 int main(int argc, char **argv)
6 char buf[256];
8 int i = argv[1] ? atoi(argv[1]) : 999999;
9 while (--i > 0) {
10 sprintf(buf, "%d", i);
11 setenv("VAR", buf, 1);
13 printf("Check size of [heap] mapping:\n");
14 freopen("/proc/self/maps", "r", stdin);
15 while (fgets(buf, sizeof(buf), stdin))
16 fputs(buf, stdout);
17 return 0;