d1ea956b94
Changelog is to big to detail here, refer to HOMEPAGE for details. I have been using 1.4.X for several months. Versions 1.4.0 and 1.4.2 have been tested in bulks by jasper@, thanks! Please contact me directly if you see regressions.
30 lines
928 B
Plaintext
30 lines
928 B
Plaintext
$OpenBSD: patch-systemv_lpadmin_c,v 1.5 2010/03/31 16:20:02 ajacoutot Exp $
|
|
--- systemv/lpadmin.c.orig Tue Feb 17 00:57:08 2009
|
|
+++ systemv/lpadmin.c Sun Aug 30 15:14:02 2009
|
|
@@ -1952,14 +1952,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 == '/' ||
|
|
@@ -1970,7 +1970,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);
|
|
}
|
|
|
|
|