From 8dd86a5b61b9a56a41f3efd9945d13b2112539c8 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Tue, 12 Nov 2002 21:14:17 +0000 Subject: [PATCH] strengthen the guard in the Pop macros, like in the XML parser, closes bug * HTMLparser.c: strengthen the guard in the Pop macros, like in the XML parser, closes bug #97315 Daniel --- ChangeLog | 5 +++++ HTMLparser.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7f575e8a..1594f441 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 12 22:06:45 CET 2002 Daniel Veillard + + * HTMLparser.c: strengthen the guard in the Pop macros, + like in the XML parser, closes bug #97315 + Tue Nov 12 21:56:39 CET 2002 Daniel Veillard * include/libxml/parser.h: fixed bug #98338 , fatalError SAX diff --git a/HTMLparser.c b/HTMLparser.c index dad64022..46109870 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -84,7 +84,7 @@ scope int html##name##Push(htmlParserCtxtPtr ctxt, type value) { \ } \ scope type html##name##Pop(htmlParserCtxtPtr ctxt) { \ type ret; \ - if (ctxt->name##Nr < 0) return(0); \ + if (ctxt->name##Nr <= 0) return(0); \ ctxt->name##Nr--; \ if (ctxt->name##Nr < 0) return(0); \ if (ctxt->name##Nr > 0) \