From ee4ed01bddc1f9b02d1a63525821ffd6227e936e Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Fri, 3 Feb 2012 19:54:50 -0500 Subject: [PATCH 1/1] Truncate marker supply names at comma Commas are used to delimit lists of printer attributes in other CUPS subsystems. This means that commas within a marker name are misinterpreted as additional markers. Truncate the marker name at the first comma, if present. Signed-off-by: Peter Hurley --- backend/snmp-supplies.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/backend/snmp-supplies.c b/backend/snmp-supplies.c index 913af81..7764160 100644 --- a/backend/snmp-supplies.c +++ b/backend/snmp-supplies.c @@ -715,7 +715,7 @@ backend_init_supplies( *ptr++ = ','; *ptr++ = '\"'; - for (name_ptr = supplies[i].name; *name_ptr;) + for (name_ptr = supplies[i].name; *name_ptr && *name_ptr != ',';) { if (*name_ptr == '\\' || *name_ptr == '\"') *ptr++ = '\\'; -- 1.7.5.4