From c51bd67e4971a20ec4f935a8c2a8cc85fc8374f2 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 30 Jul 2003 18:45:08 +0000 Subject: Fix a bus error on -CURRENT bynot trying to access memory after it's been free'd. Obtained from: FreeBSD ports tree git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@1002 df743ca5-7f9a-e211-a948-0013205c9059 --- graphics/librsvg2/Makefile | 1 + graphics/librsvg2/files/patch-rsvg.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 graphics/librsvg2/files/patch-rsvg.c diff --git a/graphics/librsvg2/Makefile b/graphics/librsvg2/Makefile index a77837563..9706a585f 100644 --- a/graphics/librsvg2/Makefile +++ b/graphics/librsvg2/Makefile @@ -7,6 +7,7 @@ PORTNAME= librsvg2 PORTVERSION= 2.3.1 +PORTREVISION= 1 CATEGORIES= graphics gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.3 diff --git a/graphics/librsvg2/files/patch-rsvg.c b/graphics/librsvg2/files/patch-rsvg.c new file mode 100644 index 000000000..54b3861e2 --- /dev/null +++ b/graphics/librsvg2/files/patch-rsvg.c @@ -0,0 +1,34 @@ +--- rsvg.c.orig Thu Jul 31 02:03:34 2003 ++++ rsvg.c Thu Jul 31 02:26:35 2003 +@@ -332,13 +332,14 @@ + { + RsvgSaxHandlerGstops *z = (RsvgSaxHandlerGstops *)self; + RsvgHandle *ctx = z->ctx; ++ RsvgSaxHandler *prev = &z->parent->super; + + if (!strcmp((char *)name, z->parent_tag)) + { + if (ctx->handler != NULL) + { + ctx->handler->free (ctx->handler); +- ctx->handler = &z->parent->super; ++ ctx->handler = prev; + } + } + } +@@ -679,13 +680,14 @@ + { + RsvgSaxHandlerStyle *z = (RsvgSaxHandlerStyle *)self; + RsvgHandle *ctx = z->ctx; ++ RsvgSaxHandler *prev = &z->parent->super; + + if (!strcmp ((char *)name, "style")) + { + if (ctx->handler != NULL) + { + ctx->handler->free (ctx->handler); +- ctx->handler = &z->parent->super; ++ ctx->handler = prev; + } + } + } -- cgit v1.2.3