summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2015-08-13 22:31:28 +0200
committerMarek Kasik <mkasik@redhat.com>2015-09-11 15:19:35 +0200
commit838391e420a0d2bf274e63a590791257ba655cbf (patch)
tree719ff5751dcc3d1bee6bb82a36fd69005515797c
parent3ffef0ca03993cb6995948183b250c8c59d9944c (diff)
downloadgtk+-838391e420a0d2bf274e63a590791257ba655cbf.tar.gz
Improve printer distinction for option retrieval
In order to retrieve the user options for a printer, the respective printer name is used. This fixes the comparison of printer names to avoid that the options of another printer are accidently read whose name starts with the same letters, but is longer (e.g. "myprinterlongername" instead of "myprinter"). This fixes Bug 753628.
-rw-r--r--modules/printbackends/cups/gtkprintbackendcups.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c
index 242ba3a09c..44868ddec5 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -3981,7 +3981,7 @@ cups_parse_user_options (const char *filename,
*lineptr++ = '\0';
- if (strncasecmp (name, printer_name, strlen (printer_name)) != 0)
+ if (strcasecmp (name, printer_name) != 0)
continue;
/* We found our printer, parse the options */