Adding Andrews buffer overflow fixes into the main branch.
[nivanova/samba-autobuild/.git] / source3 / printing / pcap.c
index 549ebcd70df6b63d63efe426232325f4f82357af..65195ab1af62d2f64a5f16604b8bb31267482fee 100644 (file)
@@ -358,8 +358,8 @@ void pcap_printer_fn(void (*fn)())
 
          if (strlen(p) <= 8 && strlen(p)>strlen(name) && !has_punctuation)
            {
-             if (!*comment) strcpy(comment,name);
-             strcpy(name,p);
+             if (!*comment) pstrcpy(comment,name);
+             pstrcpy(name,p);
              continue;
            }