]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix ipptool crash bug (STR #4262)
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 21 Jan 2013 13:00:03 +0000 (13:00 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 21 Jan 2013 13:00:03 +0000 (13:00 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10827 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.6.txt
CHANGES-IPPTOOL.txt
test/ipptool.c

index acffc95aefdb88c12ecdda43c9a9aba94c225d17..61658d25c4d7f2d5881ea25be3a2606f125f1792 100644 (file)
@@ -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)
index 22264c5190b8be212db149a23b7b75495b179608..e0078348c47fea582d32e3cf9582dcc1a75083c9 100644 (file)
@@ -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
index cddc55dfb971a5f0b61336e8d39778cc2806f3a1..34caa4a022c718e1c9f5a097f3522a80dce184f5 100644 (file)
@@ -2278,7 +2278,8 @@ do_tests(_cups_vars_t *vars,              /* I - Variables */
       if (request->attrs)
       {
        puts("<dict>");
-       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)
        {