openbsd-ports/print/cups/patches/patch-systemv_lpadmin_c
ajacoutot b886080d0c This release fixes several scheduler and printing bugs as well as a reported
security bug (which kili@ already patched for in previous commmit).
2010-11-12 07:09:00 +00:00

30 lines
928 B
Plaintext

$OpenBSD: patch-systemv_lpadmin_c,v 1.6 2010/11/12 07:09:00 ajacoutot Exp $
--- systemv/lpadmin.c.orig Fri Aug 13 03:34:04 2010
+++ systemv/lpadmin.c Fri Nov 12 07:31:19 2010
@@ -1367,14 +1367,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 == '/' ||
@@ -1385,7 +1385,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);
}