diff --git a/debian/patches/0005-attr_get_param-Silence-a-warning-message-again.patch b/debian/patches/0005-attr_get_param-Silence-a-warning-message-again.patch new file mode 100644 index 0000000..9b949f3 --- /dev/null +++ b/debian/patches/0005-attr_get_param-Silence-a-warning-message-again.patch @@ -0,0 +1,32 @@ +From: Fabian Keil +Date: Thu, 4 Dec 2014 18:20:12 +0100 +Subject: attr_get_param(): Silence a warning message again + +attr_get_param(ATTR_ENCODING) is always called once without a stack +being available, but previously the use-after-free prevented the +warning. +--- + src/attr.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/attr.c b/src/attr.c +index 2c2552b..0337fd0 100644 +--- a/src/attr.c ++++ b/src/attr.c +@@ -348,8 +348,14 @@ attr_get_param(int attr) + int i; + AttrStack *stack = stack_of_stacks_top; + if (!stack) { +- warning_handler("No stack to get attribute from"); +- return; ++ if (attr != ATTR_ENCODING) { ++ /* ++ * attr_get_param(ATTR_ENCODING) is always called ++ * called once without a stack being available. ++ */ ++ warning_handler("No stack to get attribute from"); ++ } ++ return NULL; + } + + i=stack->tos; diff --git a/debian/patches/series b/debian/patches/series index 8c9f4ae..29cff5e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ 0002-Need-to-process-word-chars-as-unsigned.-Else-char-wi.patch 0003-Fix-a-number-of-possible-crashes-caused-by-a-bad-for.patch 0004-attrstack_drop-Properly-drop-the-last-stack-element.patch +0005-attr_get_param-Silence-a-warning-message-again.patch