Abort on early end-of-file.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@8599
7a7537e8-13f0-0310-91df-
b6672ffda945
CHANGES IN CUPS V1.3.11
+ - The web interface could hang on OpenBSD (STR #3176)
- The scheduler and cupsfilter utility did not handle rules starting
with a negation operator properly (STR #3160)
- The scheduler and cupsfilter utility would crash with certain MIME
else
nbytes = 0;
}
+ else if (nbytes == 0)
+ {
+ /*
+ * CUPS STR #3176: OpenBSD: Early end-of-file on POST data causes 100% CPU
+ *
+ * This should never happen, but does on OpenBSD. If we see early end-of-
+ * file, treat this as an error and process no data.
+ */
+
+ free(data);
+ return (0);
+ }
data[length] = '\0';