diff options
author | Tor Andersson <tor@ghostscript.com> | 2011-02-03 09:04:53 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2011-02-03 09:04:53 +0000 |
commit | a89f9abbc6bf0e0836f50324ea94d340c61acf95 (patch) | |
tree | 2b8882dbe5839b5df577621c1888f35b6a4c62e9 /fitz | |
parent | a612300ea5325e59c4c22b0fda9fbdca746fde17 (diff) | |
download | mupdf-a89f9abbc6bf0e0836f50324ea94d340c61acf95.tar.xz |
Use calloc to allocate pixmap data. Limit size of PDF images to 65k x 65k.
Diffstat (limited to 'fitz')
-rw-r--r-- | fitz/res_pixmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fitz/res_pixmap.c b/fitz/res_pixmap.c index 86828c0c..88e10230 100644 --- a/fitz/res_pixmap.c +++ b/fitz/res_pixmap.c @@ -28,7 +28,7 @@ fz_newpixmapwithdata(fz_colorspace *colorspace, int x, int y, int w, int h, unsi } else { - pix->samples = fz_malloc(pix->w * pix->h * pix->n); + pix->samples = fz_calloc(pix->h, pix->w * pix->n); pix->freesamples = 1; } |