From: mike Date: Mon, 21 Jan 2013 13:00:03 +0000 (+0000) Subject: Fix ipptool crash bug (STR #4262) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f88b7236d62dab2856ca9d26fd47b0bd02b1070f;p=thirdparty%2Fcups.git Fix ipptool crash bug (STR #4262) git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10827 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/CHANGES-1.6.txt b/CHANGES-1.6.txt index acffc95aef..61658d25c4 100644 --- a/CHANGES-1.6.txt +++ b/CHANGES-1.6.txt @@ -12,6 +12,7 @@ CHANGES IN CUPS V1.6.2 - Added a French localization (STR #4247) - Added a Russian localization (STR #4228) - Updated the Catalan localization (STR #4202) + - Fixed a bug where bad IPP responses could crash ipptool (STR #4262) - Added a USB quirk rule for Xerox Phaser 3124 printers (STR #4217) - Added USB blacklisting for printers that require a custom backend (STR #4218) diff --git a/CHANGES-IPPTOOL.txt b/CHANGES-IPPTOOL.txt index 22264c5190..e0078348c4 100644 --- a/CHANGES-IPPTOOL.txt +++ b/CHANGES-IPPTOOL.txt @@ -1,4 +1,4 @@ -CHANGES-IPPTOOL.txt - 2013-01-10 +CHANGES-IPPTOOL.txt - 2013-01-21 -------------------------------- This file provides a list of changes to the ipptool binary distribution posted @@ -14,6 +14,7 @@ on cups.org. requests. - Fixed REPEAT-MATCH for STATUS and EXPECT - was incorrectly erroring out. + - Fixed a bug where bad IPP responses would cause ipptool to crash. 2012-02-28 diff --git a/test/ipptool.c b/test/ipptool.c index cddc55dfb9..34caa4a022 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -2278,7 +2278,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */ if (request->attrs) { puts(""); - for (attrptr = request->attrs, group = attrptr->group_tag; + for (attrptr = request->attrs, + group = attrptr ? attrptr->group_tag : IPP_TAG_ZERO; attrptr; attrptr = attrptr->next) print_attr(attrptr, &group); @@ -2632,7 +2633,8 @@ do_tests(_cups_vars_t *vars, /* I - Variables */ a = cupsArrayNew((cups_array_func_t)strcmp, NULL); - for (attrptr = response->attrs, group = attrptr->group_tag; + for (attrptr = response->attrs, + group = attrptr ? attrptr->group_tag : IPP_TAG_ZERO; attrptr; attrptr = attrptr->next) {