From ac5b9271acb4a969da56f300151dca5636e77c10 Mon Sep 17 00:00:00 2001 From: Jason Crain Date: Fri, 18 Nov 2016 15:44:29 -0600 Subject: [PATCH] glib: Use g_slice_new0 for PopplerActionLayer PDFs using PopplerActionLayer will sometimes crash because they are allocated with g_new0 but freed with g_slice_free. Change the allocation to use g_slice_new0. Bug #98786 --- glib/poppler-action.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc index 384530f..809fa58 100644 --- a/glib/poppler-action.cc +++ b/glib/poppler-action.cc @@ -593,7 +593,7 @@ build_ocg_state (PopplerDocument *document, for (i = 0; i < st_list->getLength(); ++i) { LinkOCGState::StateList *list = (LinkOCGState::StateList *)st_list->get(i); - PopplerActionLayer *action_layer = g_new0 (PopplerActionLayer, 1); + PopplerActionLayer *action_layer = g_slice_new0 (PopplerActionLayer); switch (list->st) { case LinkOCGState::On: -- 2.10.2