]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - ppdc/ppdc-source.cxx
Merge changes from CUPS 1.7svn-r10861.
[thirdparty/cups.git] / ppdc / ppdc-source.cxx
index 9560daa49bb7c58df45be365059bae6e4451907d..222ccfd25f69f6a315274e26a95e07318a975c01 100644 (file)
@@ -3,7 +3,7 @@
 //
 //   Source class for the CUPS PPD Compiler.
 //
-//   Copyright 2007-2012 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
@@ -2292,7 +2292,7 @@ ppdcSource::quotef(cups_file_t *fp,       // I - File to write to
            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));
@@ -2309,7 +2309,7 @@ ppdcSource::quotef(cups_file_t *fp,       // I - File to write to
            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
@@ -2327,7 +2327,7 @@ ppdcSource::quotef(cups_file_t *fp,       // I - File to write to
            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 *));