-CHANGES - 2.2.11 - 2019-01-23
+CHANGES - 2.2.11 - 2019-02-05
=============================
Changes in CUPS v2.2.11
-----------------------
+- The `ippValidateAttribute` function did not catch all instances of invalid
+ UTF-8 strings (Issue #5509)
- Running ppdmerge with the same input and output filenames did not work as
advertised (Issue #5455)
- Fixed a potential memory leak when reading at the end of a file (Issue #5473)
{
if ((*ptr & 0xe0) == 0xc0)
{
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
+ if ((ptr[1] & 0xc0) != 0x80)
break;
+
+ ptr ++;
}
else if ((*ptr & 0xf0) == 0xe0)
{
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
- break;
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
+ if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80)
break;
+
+ ptr += 2;
}
else if ((*ptr & 0xf8) == 0xf0)
{
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
- break;
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
- break;
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
+ if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80 || (ptr[3] & 0xc0) != 0x80)
break;
+
+ ptr += 3;
}
else if (*ptr & 0x80)
break;
{
if ((*ptr & 0xe0) == 0xc0)
{
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
+ if ((ptr[1] & 0xc0) != 0x80)
break;
+
+ ptr ++;
}
else if ((*ptr & 0xf0) == 0xe0)
{
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
- break;
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
+ if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80)
break;
+
+ ptr += 2;
}
else if ((*ptr & 0xf8) == 0xf0)
{
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
- break;
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
- break;
- ptr ++;
- if ((*ptr & 0xc0) != 0x80)
+ if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80 || (ptr[3] & 0xc0) != 0x80)
break;
+
+ ptr += 3;
}
else if (*ptr & 0x80)
break;