openbsd-ports/print/cups/patches/patch-systemv_lpadmin_c
bernd e5effe71d7 Update to cups-1.3.10. With lots of help from ajacoutot@.
There's an issue with the admin.cgi which will be fixed
in-tree.

ok ajacoutot@, jasper@
2009-04-27 08:25:39 +00:00

30 lines
924 B
Plaintext

$OpenBSD: patch-systemv_lpadmin_c,v 1.4 2009/04/27 08:25:39 bernd Exp $
--- systemv/lpadmin.c.orig Sat Jul 12 00:48:49 2008
+++ systemv/lpadmin.c Tue Mar 17 16:21:50 2009
@@ -1956,14 +1956,14 @@ set_printer_options(
static int /* O - 0 if name is no good, 1 if name is good */
validate_name(const char *name) /* I - Name to check */
{
- const char *ptr; /* Pointer into name */
+ const signed char *ptr; /* Pointer into name */
/*
* Scan the whole name...
*/
- for (ptr = name; *ptr; ptr ++)
+ for (ptr = (const signed char *)name; *ptr; ptr ++)
if (*ptr == '@')
break;
else if ((*ptr >= 0 && *ptr <= ' ') || *ptr == 127 || *ptr == '/' ||
@@ -1974,7 +1974,7 @@ validate_name(const char *name) /* I - Name to check
* All the characters are good; validate the length, too...
*/
- return ((ptr - name) < 128);
+ return ((ptr - (const signed char *)name) < 128);
}