1) a non NULL terminated buffer that can mess up output, spotted by Ian
Latter
2) in miscutils/strings.c: get rid of useless pointer dereference in
third part of for(;;), spotted by Larry Doolittle
3) bug when reading from a pipe and being invoked as strings
"cat Readme | strings" is broken
"cat Readme | busybox strings" works
spotted by Ian Latter and fixed by Tito.
i=0;
string=xmalloc(n+1);
- /*string[n]='\0';*/
+ string[n]='\0';
n-=1;
if(argc==0)
goto pipe;
}
- for( ;*argv!=NULL;*argv++)
+ for( ;*argv!=NULL && argc>0;argv++)
{
if((file=bb_wfopen(*argv,"r")))
{