From: Michael R Sweet Date: Mon, 18 Jun 2018 18:33:29 +0000 (-0400) Subject: Ignore bogus cups-version attribute. X-Git-Tag: v2.3b6~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd121abd354cbfcbb4c5fa23408c0270e7243bc6;p=thirdparty%2Fcups.git Ignore bogus cups-version attribute. --- diff --git a/backend/ipp.c b/backend/ipp.c index a0c386540d..8e9438d55c 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -1135,7 +1135,14 @@ main(int argc, /* I - Number of command-line args */ copies_sup = NULL; /* No */ } - cups_version = ippFindAttribute(supported, "cups-version", IPP_TAG_TEXT); + if ((cups_version = ippFindAttribute(supported, "cups-version", IPP_TAG_TEXT)) != NULL) + { + const char *version = ippGetString(cups_version, 0, NULL); + + fprintf(stderr, "DEBUG: cups-version = \"%s\"\n", version); + if (!strcmp(version, "cups-version")) + cups_version = NULL; /* Bogus cups-version value returned by buggy printers! */ + } encryption_sup = ippFindAttribute(supported, "job-password-encryption-supported", IPP_TAG_KEYWORD);