Skip to content
Permalink
Browse files
tiff: fix possible NULL pointer dereference
  • Loading branch information
monsta authored and raveit65 committed Jan 21, 2019
1 parent 6457c82 commit 19c3072e4efacf4949540c10f377b78ddb047671
Showing with 2 additions and 1 deletion.
  1. +2 −1 backend/tiff/tiff2ps.c
@@ -1542,12 +1542,13 @@ PSDataBW(TIFF2PSContext* ctx, TIFF* tif, uint32 w, uint32 h)

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

memset(tf_buf, 0, stripsize);

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

0 comments on commit 19c3072

Please sign in to comment.