forked from github/server
coverity scan CID 22574: copy into fixed size buffer
zOrder *should* probably be big enough, but static analysis says safe is safe.
This commit is contained in:
parent
6ebfd33478
commit
55b3bfd90e
1 changed files with 2 additions and 2 deletions
|
@ -430,8 +430,8 @@ int teach_cmd(unit * u, struct order *ord)
|
||||||
/* Neuen Befehl zusammenbauen. TEMP-Einheiten werden automatisch in
|
/* Neuen Befehl zusammenbauen. TEMP-Einheiten werden automatisch in
|
||||||
* ihre neuen Nummern uebersetzt. */
|
* ihre neuen Nummern uebersetzt. */
|
||||||
if (zOrder[0])
|
if (zOrder[0])
|
||||||
strcat(zOrder, " ");
|
strncat(zOrder, " ", sizeof(zOrder));
|
||||||
strcat(zOrder, unitid(u2));
|
strncat(zOrder, unitid(u2), sizeof(zOrder));
|
||||||
|
|
||||||
if (getkeyword(u2->thisorder) != K_STUDY) {
|
if (getkeyword(u2->thisorder) != K_STUDY) {
|
||||||
ADDMSG(&u->faction->msgs,
|
ADDMSG(&u->faction->msgs,
|
||||||
|
|
Loading…
Reference in a new issue