]> andersk Git - splint.git/blob - test/metastate/tainted2.c
Dave's Updates
[splint.git] / test / metastate / tainted2.c
1 # include <assert.h>
2
3 char *test (int fromuser, /*@untainted@*/ char *def)
4 {
5   char *stk = NULL;
6
7   if (fromuser != 0)
8     {
9       stk = malloc (sizeof (char) * strlen (def));
10       assert (stk != NULL);
11       strcpy (stk, def);
12     }
13   else
14     {
15       stk = malloc (sizeof (char) * 128);
16       assert (stk != NULL);
17       (void) fgets (stk, 128, stdin);
18     }
19
20   return stk;
21 }
This page took 0.037772 seconds and 5 git commands to generate.