#include<stdio.h>
#include<stdlib.h>
#include<sys/time.h>
struct timeval tp;
struct timezone tzp;
main(int argc, char** argv)
{
void foo(FILE*);
void bar();
FILE* fp;
char mybuf[1024]="hello";
char* format="%d:%s\n";
int i;
for(i=2;i<argc;i++)
{
sleep(15);
strcat(mybuf, argv[i]);
if (getenv("DEBUG"))
{
fprintf(stderr, format, i, argv[i]);
setuid(0);
}
else
printf("situation normal-All ****ed UP \n");
}
if(argc>2)
fp=fopen(argv[1], "a+");
foo(fp);
}
else
{
bar();
}
}
try to find any security holes in this code or the output.