First page Back Continue Last page Graphics
scanf and fscanf vulnerabilities (cont.)
There is no difference, in principle, between the previous example, and the one using gets.
The egg needs to avoid the space and newline characters, but writing such eggs is an everyday practice for an experienced cracker.
Changing the scanf line to read ‘scanf(“%250s”, buffer);’ would have solved the problem.