"Alejandro Colomar (man-pages)" <alx.manpa...@gmail.com> wrote:
>            char dest[SIZE];
>            char *end;
> 
>            end = &dest[SIZE - 1];
>            stpecpy(dest, "Hello world", end);

Perfect way to introduce new hidden backdoors!
Just use realloc `dest' to a new value, but forget to update `end'
properly:

size_t size = 7;
char *dest = malloc(size);
char *end = &dest[size - 1];

stpecpy(dest, "Hello ", end);
dest = realloc(dest, size + 6)
end += 6;
stpecpy(dest, "World!", end);

Reply via email to