dtprintinfo: Coverity 88097
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:53:56 +0000 (01:53 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:53:56 +0000 (01:53 +0100)
cde/programs/dtprintinfo/UI/DtPrtJobIcon.C

index 7de0f616c84cf6a8d2619b0e0775765e8d287774..02ae0eb0c999afbf91d0cee26f9b15684be4cba8 100644 (file)
@@ -103,7 +103,7 @@ void DtPrtJobIcon::PrintJobObj(PrintJob *job)
     {
       Name(job->DisplayName());
       BottomString(GetBotString(mainw, Parent(), job));
-      strcpy(job_number, job->AttributeValue((char *)JOB_NUMBER));
+      snprintf(job_number, sizeof(job_number), "%s", job->AttributeValue((char *)JOB_NUMBER));
       if (props)
        {
          props->Visible(false);