X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Ftiff%2Ftiff-document.c;h=86170e270b7f290d728cf9ba237086d52977ca8f;hb=980573bb1e6a052c6bdce27418fb868e2f2d6798;hp=d8bee9e529c0654d105011669dee450f59cf64c9;hpb=195db8ebaed712d5e6d7913d0450af34532754eb;p=evince.git diff --git a/backend/tiff/tiff-document.c b/backend/tiff/tiff-document.c index d8bee9e5..86170e27 100644 --- a/backend/tiff/tiff-document.c +++ b/backend/tiff/tiff-document.c @@ -246,11 +246,15 @@ tiff_document_render (EvDocument *document, if (width <= 0 || height <= 0) return NULL; +#ifdef HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH + rowstride = cairo_format_stride_for_width (CAIRO_FORMAT_RGB24, width); +#else rowstride = width * 4; if (rowstride / 4 != width) /* overflow */ return NULL; - +#endif + bytes = height * rowstride; if (bytes / rowstride != height) /* overflow */