Bug 698887 - oss-fuzz 5502: Claimed memory leak
Summary: oss-fuzz 5502: Claimed memory leak
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: PC Linux
: P4 normal
Assignee: Sebastian Rasmussen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-22 06:45 UTC by Sebastian Rasmussen
Modified: 2019-05-08 13:59 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
Minimzed PDF from oss-fuzz. (213 bytes, application/pdf)
2018-01-22 06:45 UTC, Sebastian Rasmussen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Rasmussen 2018-01-22 06:45:28 UTC
Created attachment 14618 [details]
Minimzed PDF from oss-fuzz.

The backtrace looks like this, though valgrind and build=sanitize do not reproduce this, perhaps some new -fsanitize= option will find something?

Direct leak of 11352 byte(s) in 1 object(s) allocated from:
	    #0 0x4e1398 in malloc _asan_rtl_
	    #1 0x65ee42 in do_scavenging_malloc /src/mupdf/source/fitz/memory.c:22:7
	    #2 0x65f31d in fz_calloc /src/mupdf/source/fitz/memory.c:124:6
	    #3 0x719b88 in fz_new_device_of_size /src/mupdf/source/fitz/device.c:9:19
	    #4 0x5c122c in new_draw_device /src/mupdf/source/fitz/draw-device.c:2975:24
	    #5 0x6a3e86 in fz_new_pixmap_from_page /src/mupdf/source/fitz/util.c:236:9
	    #6 0x6a4176 in fz_new_pixmap_from_page_number /src/mupdf/source/fitz/util.c:261:9
Comment 1 Sebastian Rasmussen 2018-08-11 20:22:28 UTC
I have a proposed fix for this awaiting review.
Comment 2 Sebastian Rasmussen 2018-08-14 13:22:22 UTC
Fixed in

commit 8aa2bd34065d2844aae778bd4cc20c74bbcd9406
Author: Sebastian Rasmussen <sebras@gmail.com>
Date:   Sun Aug 12 04:14:03 2018 +0800

    Bug 698887: Fix leak of device/pixmap when rendering fails.