Fix printf
This commit is contained in:
parent
843449196d
commit
b69ef84f98
3 changed files with 5 additions and 5 deletions
|
|
@ -56,7 +56,7 @@ bool scan_decoded_files(zip zip)
|
||||||
// Verify CDH/LFH parsed sizes to avoid undefined behavior
|
// Verify CDH/LFH parsed sizes to avoid undefined behavior
|
||||||
if (lfh->filename_length != zip.cdh_filename_length[i])
|
if (lfh->filename_length != zip.cdh_filename_length[i])
|
||||||
{
|
{
|
||||||
printf("[ERROR] Mismatch in CDH/LFH filename lengths.\n");
|
fprintf(stderr, "[ERROR] Mismatch in CDH/LFH filename lengths.\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ void get_eocd(zip* z)
|
||||||
|
|
||||||
if (!z->lfh_off || !z->cdh_filename_length)
|
if (!z->lfh_off || !z->cdh_filename_length)
|
||||||
{
|
{
|
||||||
printf(
|
fprintf(stderr,
|
||||||
"[ERROR] Failed to allocate CDH/LFH buffer for %d entries\n",
|
"[ERROR] Failed to allocate CDH/LFH buffer for %d entries\n",
|
||||||
z->entries);
|
z->entries);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
@ -86,7 +86,7 @@ char* decode_type1_block_vuln(bitstream* bs, char* decoded_data)
|
||||||
|
|
||||||
if ((token = next_token(bs, tr_dist)) == END_OF_BLOCK)
|
if ((token = next_token(bs, tr_dist)) == END_OF_BLOCK)
|
||||||
{
|
{
|
||||||
printf("[ERROR] Got EndOfBlock when decoding distance token\n");
|
fprintf(stderr, "[ERROR] Got EndOfBlock when decoding distance token\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -126,7 +126,7 @@ char* decode_type1_block_v2(
|
||||||
|
|
||||||
if ((token = next_token(bs, tr_dist)) == END_OF_BLOCK)
|
if ((token = next_token(bs, tr_dist)) == END_OF_BLOCK)
|
||||||
{
|
{
|
||||||
printf("[ERROR] Got EndOfBlock when decoding distance token\n");
|
fprintf(stderr, "[ERROR] Got EndOfBlock when decoding distance token\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
if (scan_zip(buf, read_size))
|
if (scan_zip(buf, read_size))
|
||||||
{
|
{
|
||||||
printf("[ERROR] Cannot upload file, potential virus detected\n");
|
fprintf(stderr, "[ERROR] Cannot upload file, potential virus detected\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue