← Commit list

edaf39156

Glenn L McGrath
Glenn L McGrath
2004-04-30
FAILED Duration: 22s

Subject

Bugfixes 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

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/strings.c+2 -2
@@ -67,7 +67,7 @@ int strings_main(int argc, char **argv)
i=0;
string=xmalloc(n+1);
- /*string[n]='\0';*/
+ string[n]='\0';
n-=1;
if(argc==0)
@@ -77,7 +77,7 @@ int strings_main(int argc, char **argv)
goto pipe;
}
- for( ;*argv!=NULL;*argv++)
+ for( ;*argv!=NULL && argc>0;argv++)
{
if((file=bb_wfopen(*argv,"r")))
{