diff options
Diffstat (limited to 'cups/ppd.c')
-rw-r--r-- | cups/ppd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cups/ppd.c b/cups/ppd.c index 1ff51b244..fe58fcfe0 100644 --- a/cups/ppd.c +++ b/cups/ppd.c @@ -1264,7 +1264,7 @@ _ppdOpen( ppd->patches = temp; - strcpy(ppd->patches + strlen(ppd->patches), string); + memcpy(ppd->patches + strlen(ppd->patches), string, strlen(string) + 1); } } else if (!strcmp(keyword, "OpenUI")) @@ -1378,7 +1378,7 @@ _ppdOpen( */ if (!_cups_strcasecmp(name, "PageRegion")) - strcpy(custom_name, "CustomPageSize"); + strlcpy(custom_name, "CustomPageSize", sizeof(custom_name)); else snprintf(custom_name, sizeof(custom_name), "Custom%s", name); @@ -1944,9 +1944,9 @@ _ppdOpen( cupsCharsetToUTF8((cups_utf8_t *)choice->text, text, sizeof(choice->text), encoding); else if (!strcmp(name, "True")) - strcpy(choice->text, _("Yes")); + strlcpy(choice->text, _("Yes"), sizeof(choice->text)); else if (!strcmp(name, "False")) - strcpy(choice->text, _("No")); + strlcpy(choice->text, _("No"), sizeof(choice->text)); else strlcpy(choice->text, name, sizeof(choice->text)); |