Skip to content

Commit

Permalink
tiff: fix possible NULL pointer dereference
Browse files Browse the repository at this point in the history
  • Loading branch information
monsta authored and raveit65 committed Jan 21, 2019
1 parent 6457c82 commit 19c3072
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/tiff/tiff2ps.c
Expand Up @@ -1542,12 +1542,13 @@ PSDataBW(TIFF2PSContext* ctx, TIFF* tif, uint32 w, uint32 h)


(void) w; (void) h; (void) w; (void) h;
tf_buf = (unsigned char *) _TIFFmalloc(stripsize); tf_buf = (unsigned char *) _TIFFmalloc(stripsize);
memset(tf_buf, 0, stripsize);
if (tf_buf == NULL) { if (tf_buf == NULL) {
TIFFError(ctx->filename, "No space for scanline buffer"); TIFFError(ctx->filename, "No space for scanline buffer");
return; return;
} }


memset(tf_buf, 0, stripsize);

#if defined( EXP_ASCII85ENCODER ) #if defined( EXP_ASCII85ENCODER )
if ( ctx->ascii85 ) { if ( ctx->ascii85 ) {
/* /*
Expand Down

0 comments on commit 19c3072

Please sign in to comment.