From: msweet Date: Thu, 2 Oct 2014 18:40:12 +0000 (+0000) Subject: Protect against NULL collection values () X-Git-Tag: v2.2b1~467 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c69d4628c8f94c68e307a41de7528ae097e953a;p=thirdparty%2Fcups.git Protect against NULL collection values () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12193 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/cups/ipp-support.c b/cups/ipp-support.c index 895e6fc430..1964ad00b8 100644 --- a/cups/ipp-support.c +++ b/cups/ipp-support.c @@ -2223,6 +2223,14 @@ ipp_col_string(ipp_t *col, /* I - Collection attribute */ ipp_attribute_t *attr; /* Current member attribute */ + if (!col) + { + if (buffer) + *buffer = '\0'; + + return (0); + } + bufptr = buffer; bufend = buffer + bufsize - 1;