Fix to Coverity defect 76134
This commit is contained in:
@ -57,9 +57,7 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
fgets(readbuff,4092,infile);
|
fgets(readbuff,4092,infile);
|
||||||
psize = strlen(readbuff);
|
psize = strlen(readbuff);
|
||||||
if(psize > 4092){
|
if(psize < 4092){
|
||||||
continue;
|
|
||||||
}
|
|
||||||
qbuff = gwbuf_alloc(psize + 7);
|
qbuff = gwbuf_alloc(psize + 7);
|
||||||
*(qbuff->sbuf->data + 0) = (unsigned char)psize;
|
*(qbuff->sbuf->data + 0) = (unsigned char)psize;
|
||||||
*(qbuff->sbuf->data + 1) = (unsigned char)(psize>>8);
|
*(qbuff->sbuf->data + 1) = (unsigned char)(psize>>8);
|
||||||
@ -71,7 +69,7 @@ int main(int argc, char** argv)
|
|||||||
fprintf(outfile,"%s\n",tok);
|
fprintf(outfile,"%s\n",tok);
|
||||||
free(tok);
|
free(tok);
|
||||||
gwbuf_free(qbuff);
|
gwbuf_free(qbuff);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fclose(infile);
|
fclose(infile);
|
||||||
fclose(outfile);
|
fclose(outfile);
|
||||||
|
Reference in New Issue
Block a user