From db837b4742567b24b354ef686f5b9e11d62a0e50 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 18 Jun 2018 14:33:07 -0400 Subject: [PATCH] Ignore bogus cups-version attribute. --- backend/ipp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/ipp.c b/backend/ipp.c index 61e706ec7..0a9d27cfe 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -1,7 +1,7 @@ /* * IPP backend for CUPS. * - * Copyright 2007-2017 by Apple Inc. + * Copyright 2007-2018 by Apple Inc. * Copyright 1997-2007 by Easy Software Products, all rights reserved. * * These coded instructions, statements, and computer programs are the @@ -1140,7 +1140,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); -- 2.39.2