From 2dc021f33a3ea358c9f5c5c54643adc4c46a84a1 Mon Sep 17 00:00:00 2001
From: Michael R Sweet <msweet@msweet.org>
Date: Wed, 3 Dec 2025 07:25:30 -0500
Subject: [PATCH] Fix an infinite loop issue in GTK+ (Issue #1439)

---
 CHANGES.md  | 1 +
 cups/http.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

#diff --git a/CHANGES.md b/CHANGES.md
#index df89f2d28..da97b4c0a 100644
#--- a/CHANGES.md
#+++ b/CHANGES.md
#@@ -10,6 +10,7 @@ Changes in CUPS v2.4.16 (YYYY-MM-DD)
# - The web interface did not support domain usernames fully (Issue #1441)
# - Made the presence of the "JobPrivateXxx" and "SubscriptionPrivateXxx"
#   directives outside a Policy an informational warning.
#+- Fixed an infinite loop issue in the GTK+ print dialog (Issue #1439)
# 
# 
# Changes in CUPS v2.4.15 (2025-11-27)
--- a/cups/http.c
+++ b/cups/http.c
@@ -2759,7 +2759,7 @@ _httpUpdate(http_t        *http,	/* I -
     /* See whether our read buffer is full... */
     DEBUG_printf(("2_httpUpdate: used=%d", http->used));
 
-    if (http->used > 0 && !memchr(http->buffer, '\n', (size_t)http->used) && (size_t)http->used < sizeof(http->buffer))
+    if (http->used < sizeof(http->buffer))
     {
       /* No, try filling in more data... */
       if ((bytes = http_read(http, http->buffer + http->used, sizeof(http->buffer) - (size_t)http->used, /*timeout*/0)) > 0)
