]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/snprintf.c
Merge changes from CUPS 1.7svn-r10861.
[thirdparty/cups.git] / cups / snprintf.c
index 9271052d5799c3340002243f9dc202210591ac77..65f261d3fa2d310664cfdce4ba1284cb82395a94 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   snprintf functions for CUPS.
  *
- *   Copyright 2007-2012 by Apple Inc.
+ *   Copyright 2007-2013 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -296,13 +296,13 @@ _cups_vsnprintf(char       *buffer,       /* O - Output buffer */
 
              if (sign == '-')
              {
-               strncpy(bufptr, s, (size_t)slen);
+               memcpy(bufptr, s, (size_t)slen);
                memset(bufptr + slen, ' ', (size_t)(width - slen));
              }
              else
              {
                memset(bufptr, ' ', (size_t)(width - slen));
-               strncpy(bufptr + width - slen, s, (size_t)slen);
+               memcpy(bufptr + width - slen, s, (size_t)slen);
              }
 
              bufptr += width;