diff -ruN simscan-1.4.0-patched-3/simscanmk.c simscan-1.4.0-patched-4/simscanmk.c --- simscan-1.4.0-patched-3/simscanmk.c 2008-10-07 21:39:02.000000000 -0400 +++ simscan-1.4.0-patched-4/simscanmk.c 2008-10-07 21:36:26.000000000 -0400 @@ -180,6 +180,11 @@ Initializing : Pattern version 218 (pattern number 51417) and we want 6.150-1001/218/51417 in the string at the end */ + if(r == -1){ + printf("error reading trophie pipe: %s\n", strerror(errno)); + break; + } + input[r]='\0'; if ( (pos=strstr(input,"version ")) && (!fnd_vsvers || !fnd_patvers)){ if (!fnd_vsvers && !fnd_patvers){ @@ -230,6 +235,12 @@ SpamAssassin version 2.63 and have 2.63 as version */ + + if(r == -1){ + printf("error reading spamassassin pipe: %s\n", strerror(errno)); + break; + } + input[r]='\0'; if ( (pos=strstr(input,"version ")) && !fnd_vsvers ){ /* this line is the sa version */ @@ -266,6 +277,12 @@ /* we are looking for this line: Version: 27 */ + + if(r == -1){ + printf("error reading clamdscan pipe: %s\n", strerror(errno)); + break; + } + input[r]='\0'; if ( (pos=strstr(input,"ClamAV "))){ /* this line is the db version */ @@ -308,6 +325,12 @@ /* we are looking for this line: Version: 27 */ + + if(r == -1){ + printf("error reading sigtool pipe: %s\n", strerror(errno)); + break; + } + input[r]='\0'; if ( (pos=strstr(input,"Version: "))){ /* this line is the db version */ @@ -347,6 +370,12 @@ /* we are looking for this line: Version: 27 */ + + if(r == -1){ + printf("error reading sigtool pipe: %s\n", strerror(errno)); + break; + } + input[r]='\0'; if ( (pos=strstr(input,"Version: "))){ /* this line is the db version */