diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2022-08-22 13:12:34 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2022-08-22 13:27:04 +0100 |
commit | df68bad09c49a3d03892ad15a81550389b4b2028 (patch) | |
tree | 97fa3c72db5e4808a68f107df5b00631a5906f18 | |
parent | 3fb2d786b42c494d41bb3a0de0b1224f83dfbcd9 (diff) | |
download | ghostpdl-df68bad09c49a3d03892ad15a81550389b4b2028.tar.gz |
GhostPDF - fix memory leak
Seen with OSS-fuzz #42920, teh nullpage device and Ghostscript (not gpdf)
To gt the reference counting right we need to not count up 'currdict',
but we do need to NULL 'Parent' instead.
-rw-r--r-- | pdf/pdf_annot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c index fe65803f3..a7a2c56ea 100644 --- a/pdf/pdf_annot.c +++ b/pdf/pdf_annot.c @@ -3698,7 +3698,7 @@ static int pdfi_annot_draw_Widget(pdf_context *ctx, pdf_dict *annot, pdf_obj *No } pdfi_countdown(currdict); currdict = Parent; - pdfi_countup(currdict); + Parent = NULL; } else break; } |