Tag: security
Questions Related to security
-
Heap Overflow
-
Integer overflow
-
Buffer overflow
-
No Vulnerability
-
j=getchar();
-
gets(ipstring);
-
Both
-
None
-
This is a double free vulnerability and must be fixed
-
The second call to free() will return an error
-
There might be compiler warnings, but the program will run fine
-
This is not a security issue
-
for (i=0;i<=3;i++)
-
intarray[i]=i*i;
-
Both
-
None
-
Heap overflow
-
Integer overflow
-
Off by one error
-
None
-
strncpy(dst,src,len(dst))
-
strncpy(dst,src,len(src)+1)
-
strncpy(dst,src,len(dst)+1)
-
strncpy(dst,src,len(dst)-1)
-
printf ("%.8s",name); AND printf (name);
-
printf (name); AND printf ("%s",name);
-
printf ("%s",name); AND printf ("%8c", name);
-
printf (name);
-
scanf("%.8s", name);
-
scanf("%8s", name);
-
scanf("%8c", name);
-
scanf("%s", name);
-
delete ptr2; (within if loop) AND delete ptr1;
-
delete ptr1; AND delete ptr2; (outside if loop )
-
delete ptr2; (within if loop)
-
delete ptr2; (outside if loop )
-
4 - it is the size of the pointer
-
5 - it is the number of characters in the string that the pointer points to
-
4 - it is the size when 32000 is stored as integer
-
1 - it is the size of a character variable