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:
parent
c6dd25b884
commit
1cd6ca0999
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue