-CHANGES - 2.3b8 - 2019-01-24
+CHANGES - 2.3b8 - 2019-02-05
============================
- Fixed a potential crash bug in cups-driverd (rdar://46625579)
- Fixed a performance regression with large PPDs (rdar://47040759)
+- The `ippValidateAttribute` function did not catch all instances of invalid
+ UTF-8 strings (Issue #5509)
- Fixed a potential memory leak when reading at the end of a file (Issue #5473)
- Fixed potential unaligned accesses in the string pool (Issue #5474)
- Fixed a potential memory leak when loading a PPD file (Issue #5475)
{
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;