Merge 3027b2407fcad80bc8d707e9f3b32106aa246f45 on remote branch
Change-Id: I911d339a77ba9a01dbc9c1d61999f2a79f3aaa15
diff --git a/README.version b/README.version
new file mode 100644
index 0000000..5a727df
--- /dev/null
+++ b/README.version
@@ -0,0 +1,10 @@
+URL: https://github.com/apple/cups
+Version: v2.2.9
+License: LGPL
+Description:
+CUPS is the standards-based, open source printing system developed by Apple Inc. for macOS® and other UNIX®-like operating systems. CUPS uses the Internet Printing Protocol (IPP) to support printing to local and network printers.
+
+Local Modifications:
+ Fix for CVE-2020-3898 (I1e4988e753c0ed1df43937b3009fd62ecd81ccc0)
+ Fix for CVE-2019-8842 (Ib3d4260899941f0c8050cf6d77a9022db63bdc66)
+ Use boringSSL
diff --git a/cups/ipp.c b/cups/ipp.c
index cc9c6af..d46cc37 100644
--- a/cups/ipp.c
+++ b/cups/ipp.c
@@ -2960,7 +2960,7 @@
* Read 32-bit "extension" tag...
*/
- if ((*cb)(src, buffer, 4) < 1)
+ if ((*cb)(src, buffer, 4) < 4)
{
DEBUG_puts("1ippReadIO: Callback returned EOF/error");
_cupsBufferRelease((char *)buffer);
diff --git a/cups/ppd.c b/cups/ppd.c
index 5f27484..46ee8a9 100644
--- a/cups/ppd.c
+++ b/cups/ppd.c
@@ -1776,8 +1776,7 @@
constraint->choice1, constraint->option2,
constraint->choice2))
{
- case 0 : /* Error */
- case 1 : /* Error */
+ default : /* Error */
pg->ppd_status = PPD_BAD_UI_CONSTRAINTS;
goto error;
diff --git a/cups/tls-boringssl.c b/cups/tls-boringssl.c
index 6dab074..b866d7a 100644
--- a/cups/tls-boringssl.c
+++ b/cups/tls-boringssl.c
@@ -443,6 +443,8 @@
if (error != 0)
{
+ SSL_free(http->tls);
+ http->tls = NULL;
http->error = errno = EINVAL;
http->status = HTTP_STATUS_ERROR;
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Client rejected the server certificate."), 1);