//
-// "$Id$"
+// "$Id: ppdc-source.cxx 4167 2013-02-04 19:27:13Z msweet $"
//
// Source class for the CUPS PPD Compiler.
//
-// Copyright 2007-2011 by Apple Inc.
+// Copyright 2007-2013 by Apple Inc.
// Copyright 2002-2007 by Easy Software Products.
//
// These coded instructions, statements, and computer programs are the
while (isspace(*ptr))
ptr ++;
- strcpy(program, ptr);
+ strlcpy(program, ptr, sizeof(program));
}
else
{
// NAME logicop value
for (newv = (char *)v + 1;
*newv && (isalnum(*newv & 255) || *newv == '_');
- newv ++);
+ newv ++)
+ /* do nothing */;
ch = *newv;
*newv = '\0';
if ((baseptr = strrchr(basedir, '/')) != NULL)
*baseptr = '\0';
else
- strcpy(basedir, ".");
+ strlcpy(basedir, ".", sizeof(basedir));
// Find the po file...
pofilename[0] = '\0';
if ((format - bufformat + 1) > (int)sizeof(tformat))
break;
- strncpy(tformat, bufformat, format - bufformat);
+ memcpy(tformat, bufformat, format - bufformat);
tformat[format - bufformat] = '\0';
bytes += cupsFilePrintf(fp, tformat, va_arg(ap, double));
if ((format - bufformat + 1) > (int)sizeof(tformat))
break;
- strncpy(tformat, bufformat, format - bufformat);
+ memcpy(tformat, bufformat, format - bufformat);
tformat[format - bufformat] = '\0';
# ifdef HAVE_LONG_LONG
if ((format - bufformat + 1) > (int)sizeof(tformat))
break;
- strncpy(tformat, bufformat, format - bufformat);
+ memcpy(tformat, bufformat, format - bufformat);
tformat[format - bufformat] = '\0';
bytes += cupsFilePrintf(fp, tformat, va_arg(ap, void *));
if ((baseptr = strrchr(basedir, '/')) != NULL)
*baseptr = '\0';
else
- strcpy(basedir, ".");
+ strlcpy(basedir, ".", sizeof(basedir));
// Find the include file...
if (find_include(inctemp, basedir, incname, sizeof(incname)))
//
-// End of "$Id$".
+// End of "$Id: ppdc-source.cxx 4167 2013-02-04 19:27:13Z msweet $".
//