From 1cd6ca09995907818b5fe6734bdd333e088f9385 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Wed, 4 Jul 2018 01:49:50 +0100 Subject: [PATCH] dtprintinfo: Coverity 88650 --- cde/programs/dtprintinfo/UI/DtPrinterIcon.C | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cde/programs/dtprintinfo/UI/DtPrinterIcon.C b/cde/programs/dtprintinfo/UI/DtPrinterIcon.C index 385f1d31..16ff6926 100644 --- a/cde/programs/dtprintinfo/UI/DtPrinterIcon.C +++ b/cde/programs/dtprintinfo/UI/DtPrinterIcon.C @@ -752,17 +752,17 @@ char *DtPrinterIcon::GetPrinterIcon(const char *printer, { static char buf[200]; - sprintf(buf, "%s_Print", printer); + snprintf(buf, sizeof(buf), "%s_Print", printer); if (_app_mode != INITIALIZE_PRINTERS && DtActionExists(buf)) { char *iconfile = DtActionIcon(buf); if (iconfile) - strcpy(buf, iconfile); + snprintf(buf, sizeof(buf), "%s", iconfile); else - strcpy(buf, PRINTER_ICON_FILE); + snprintf(buf, sizeof(buf), "%s", PRINTER_ICON_FILE); } else - strcpy(buf, PRINTER_ICON_FILE); + snprintf(buf, sizeof(buf), "%s", PRINTER_ICON_FILE); return buf; } -- 2.25.1