#include
#define CMD "/usr/bin/printf"
int
main(void)
{
execle(CMD, CMD, "\\", NULL, (char *[]){"BROKEN", NULL});
}
On Sat, Apr 2, 2011 at 4:48 AM, Andres Perera wrote:
>
> print_escape returns 1 even if it's on null, and the rest of the
> prog just ignores null literals
>
> $ env -i sh
print_escape returns 1 even if it's on null, and the rest of the
prog just ignores null literals
$ env -i sh -c '/usr/bin/printf \\'
printf: unknown escape sequence `\'
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin
diff -u -r1.17 printf.c
--- printf.c27 Oct 2009 23:59:41 -0