/*
- * $Id: lp.c,v 1.21 2009-01-21 02:43:46 didg Exp $
+ * $Id: lp.c,v 1.22 2009-01-28 18:03:15 morgana Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
case '$':
case '\\':
case '"':
+ case ';':
+ case '&':
+ case '(':
+ case ')':
+ case ' ':
+ case '*':
+ case '#':
+ case '|':
+ case '>':
+ case '<':
+ case '[':
+ case ']':
+ case '{':
+ case '}':
+ case '^':
+ case '?':
+ case '~':
case '`':
+ case '\x0A':
+ case '\xFF':
if (used + 2 > bsize )
return used;
*dest = '\\';
if (!src)
return NULL;
- memset(dest, 0, MAXPATHLEN +1);
+ memset(dest, 0, sizeof(destbuf));
if ((p = strchr(src, '%')) == NULL) { /* nothing to do */
- strncpy(dest, src, MAXPATHLEN);
+ strncpy(dest, src, sizeof(dest) - 1);
return destbuf;
}
/* first part of the path. copy and forward to the next variable. */