glib/poppler-action.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e59cbaf9c1ab4a575633ee3263244e03c6d21713
Author: Jason Crain <[email protected]>
Date:   Fri Nov 18 15:44:29 2016 -0600

    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

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:
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to