1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtprintinfo: Coverity 88650

This commit is contained in:
Peter Howkins 2018-07-04 01:49:50 +01:00
parent c6dd25b884
commit 1cd6ca0999

View file

@ -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;
}