View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003046 | FSSCP | FRED | public | 2014-05-23 23:34 | 2014-05-24 17:18 |
Reporter | niffiwan | Assigned To | Goober5000 | ||
Priority | low | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | 3.7.2 RC1 | ||||
Target Version | 3.7.2 | ||||
Summary | 0003046: Coverity ID 1204292 Uninitialized scalar variable in mission/missionparse.cpp | ||||
Description | The issue is reported in function void restore_default_weapons(char *ships_tbl) which seems to be part of the FS1 to FS2 mission conversion code. (In other words, this is probably an issue unlikely to be encountered at the moment, so low priority). Anyway, this var is not initialised before it's used in a strstr() comparison, which seems like it could have unintended results :) char ship_class[NAME_LENGTH]; ... ch = strstr(ships_tbl, ship_class); That said, "ship_class" doesn't seem to be set anywhere in the function which makes me think the function won't do what it's intended to do. My question is; the reported error is easy to fix (i.e. init to '\0' or similar) but there's the bigger issue of where ship_class should be assigned (in the loop presumably). Should the assignment removed in r2768 be readded? | ||||
Tags | No tags attached. | ||||
|
Argh... There was a strcpy that was accidentally removed in 2768. The result isn't a crash or game breaker, it just means that the remainder of the function is skipped. As a result, the "import weapon loadouts" option does nothing. Good job of Coverity to catch it, but I'll have to see what this means for FSPort. :p |
|
Fix committed to trunk@10718. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-05-23 23:34 | niffiwan | New Issue | |
2014-05-23 23:34 | niffiwan | Status | new => assigned |
2014-05-23 23:34 | niffiwan | Assigned To | => Goober5000 |
2014-05-24 17:16 | Goober5000 | Note Added: 0015759 | |
2014-05-24 17:18 | Goober5000 | Changeset attached | => fs2open trunk r10718 |
2014-05-24 17:18 | Goober5000 | Note Added: 0015760 | |
2014-05-24 17:18 | Goober5000 | Status | assigned => resolved |
2014-05-24 17:18 | Goober5000 | Resolution | open => fixed |