summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-08-22 13:12:34 +0100
committerKen Sharp <ken.sharp@artifex.com>2022-08-22 13:27:04 +0100
commitdf68bad09c49a3d03892ad15a81550389b4b2028 (patch)
tree97fa3c72db5e4808a68f107df5b00631a5906f18
parent3fb2d786b42c494d41bb3a0de0b1224f83dfbcd9 (diff)
downloadghostpdl-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.c2
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;
}