dtprintinfo: correct another possible buffer overflow
authorJon Trulson <jon@radscan.com>
Tue, 7 May 2019 00:23:36 +0000 (18:23 -0600)
committerJon Trulson <jon@radscan.com>
Tue, 7 May 2019 17:21:49 +0000 (11:21 -0600)
cde/programs/dtprintinfo/objects/PrintObj/Queue.C

index a5c102bab35a16a6053777b18aabab8aa924640a..c1c3ae58ca5f3b5a6a0f739b2cd44ab413481d9d 100644 (file)
@@ -336,7 +336,7 @@ int Queue::Stop(BaseObj *obj, char **output, BaseObj * /*requestor*/)
    else
 #endif
     {
-      sprintf(command, STOP_QUEUE_CMD, queue->Name());
+        snprintf(command, 100, STOP_QUEUE_CMD, queue->Name());
       rc = queue->RunCommand(command, NULL, output);
     }
     delete [] command;