summaryrefslogtreecommitdiff
path: root/graphics/librsvg2
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2003-07-30 18:40:46 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2003-07-30 18:40:46 +0000
commit8865ce43499746160c0e669b08a5916d8ab80390 (patch)
treeac74fc067c3bb0a7c5cb72f56db209b924a89a5f /graphics/librsvg2
parentFix build, reported by bento (diff)
Do not try and access memory after it's been free'd. This fixes a bus
error on -CURRENT with default malloc options. PR: 55076 Submitted by: Alexander Nedotsukov <bland@mail.ru>
Diffstat (limited to 'graphics/librsvg2')
-rw-r--r--graphics/librsvg2/Makefile2
-rw-r--r--graphics/librsvg2/files/patch-rsvg.c34
2 files changed, 35 insertions, 1 deletions
diff --git a/graphics/librsvg2/Makefile b/graphics/librsvg2/Makefile
index 441acc4fced6..d3ba995acfbc 100644
--- a/graphics/librsvg2/Makefile
+++ b/graphics/librsvg2/Makefile
@@ -7,7 +7,7 @@
PORTNAME= librsvg2
PORTVERSION= 2.2.5
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= graphics gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.2
diff --git a/graphics/librsvg2/files/patch-rsvg.c b/graphics/librsvg2/files/patch-rsvg.c
new file mode 100644
index 000000000000..54b3861e208f
--- /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;
+ }
+ }
+ }