Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ v3.0.4 - YYYY-MM-DD
by an unknown CA.
- Fixed PAM support in `ippeveprinter`.
- Fixed a typo in the JWT HS verification code.
- Fixed `isxdigit`/`isdigit` calls in `http_create` and `_cupsEncodeOption` that
passed an unmasked signed `char`.
- Updated dateTime parsing in IPP files.


Expand Down
2 changes: 1 addition & 1 deletion cups/encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ _cupsEncodeOption(
case IPP_TAG_INTEGER :
case IPP_TAG_ENUM :
// Integer/enumeration value...
if (isdigit(*val) || *val == '-' || *val == '+')
if (isdigit(*val & 255) || *val == '-' || *val == '+')
ippSetInteger(ipp, &attr, i, (int)strtol(val, &s, 10));
else
ippSetInteger(ipp, &attr, i, ippEnumValue(name, val));
Expand Down
2 changes: 1 addition & 1 deletion cups/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -3600,7 +3600,7 @@ http_create(
if ((zoneid = strchr(http->hostname, '%')) != NULL)
*zoneid = '+';
}
else if (isxdigit(host[0]) && isxdigit(host[1]) && isxdigit(host[2]) && isxdigit(host[3]) && host[4] == ':')
else if (isxdigit(host[0] & 255) && isxdigit(host[1] & 255) && isxdigit(host[2] & 255) && isxdigit(host[3] & 255) && host[4] == ':')
{
// IPv6 address, convert to URI format...
snprintf(http->hostname, sizeof(http->hostname), "[%s]", host);
Expand Down
Loading