From 6c07edd933af592c301d061b9f33fa3f739d8c88 Mon Sep 17 00:00:00 2001 From: Ondrej Vasik Date: Feb 11 2015 12:26:49 +0000 Subject: xmlif/xmlif.{c,l}: fix double free with invalid end attribute git-svn-id: https://svn.fedorahosted.org/svn/xmlto@82 eb1b79c1-ba03-4820-82f3-b60cf523859b --- diff --git a/ChangeLog b/ChangeLog index 71b3659..ce71e9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2015-02-11 Ondrej Vasik + * xmlif/xmlif.{c,l}: fix double free with invalid end attribute + 2015-02-05 Ondrej Vasik * xmlif/xmlif.{c,l}: fix segfault with malformed end attribute diff --git a/xmlif/xmlif.c b/xmlif/xmlif.c index c461475..3c9fd89 100644 --- a/xmlif/xmlif.c +++ b/xmlif/xmlif.c @@ -1138,6 +1138,8 @@ static void end_attribute(void) if (attribute) free(attribute); + attribute=NULL; + if (!end->up) { fprintf(stderr,"xmlif: malformed end attribute!\n"); diff --git a/xmlif/xmlif.l b/xmlif/xmlif.l index 4a171f0..ac42136 100644 --- a/xmlif/xmlif.l +++ b/xmlif/xmlif.l @@ -100,6 +100,8 @@ static void end_attribute(void) if (attribute) free(attribute); + attribute=NULL; + if (!end->up) { fprintf(stderr,"xmlif: malformed end attribute!\n");