Skip to content

Commit f7cd8e3

Browse files
committed
Restore name buffer length check.
1 parent 65b44e4 commit f7cd8e3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎cups/ipp.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5580,6 +5580,14 @@ ipp_read_io(void *src, // I - Data source
55805580
}
55815581

55825582
n = (buffer[0] << 8) | buffer[1];
5583+
5584+
if (n >= IPP_BUF_SIZE)
5585+
{
5586+
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("IPP name larger than 32767 bytes."), true);
5587+
DEBUG_printf("1ipp_read_io: bad name length %d.", n);
5588+
goto rollback;
5589+
}
5590+
55835591
DEBUG_printf("2ipp_read_io: name length=%d", n);
55845592

55855593
if (n && parent)

0 commit comments

Comments
 (0)