dtprintinfo: Coverity 88447
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:57:52 +0000 (01:57 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:57:52 +0000 (01:57 +0100)
cde/programs/dtprintinfo/objects/PrintObj/ParseJobs.C

index 2adbcfdbf7ac64587abd03cb76c9eb88c44eea34..b970d7eb37cb8d4e8fc8f57ddfa21f1aa119a382 100644 (file)
@@ -1181,7 +1181,7 @@ int ParseAIXv3PrintJobs(char *_printer, char *jobs,
    static char *job_list = NULL;
    static int prev_buf_size = 0;
 
-   strcpy(printer, _printer);
+   snprintf(printer, sizeof(printer), "%s", _printer);
    if (s = strchr(printer, ':'))
       *s = '\0';