Skip to content

Commit 44bb932

Browse files
dlmilesRTimothyEdwards
authored andcommitted
ExtTech.c: fix uninitialized exts_linearResist value leaks into extresist
This value appears to be initialised at only one spot in the codebase (under very narrow conditions) but extresist will read it and make branching decisions based on the uninitialised state. This 'X' state propagation appears to eventually get processed in ResWriteExtFile() near where final output formatting is occurring. It is unclear (at this time) if it perturbs output values in a problematic way, or if due to algorithmic reasons the data is discarded before output anyway. I have at least one trace run (with multiple triggers) of printf formatters handling uninitialised data in ResWriteExtFile().
1 parent 2c9e3a5 commit 44bb932

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

extract/ExtTech.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2807,6 +2807,7 @@ ExtTechLine(sectionName, argc, argv)
28072807
}
28082808
devptr->exts_deviceResist.ht_table = (HashEntry **) NULL;
28092809
HashInit(&devptr->exts_deviceResist, 8, HT_STRINGKEYS);
2810+
devptr->exts_linearResist = 0;
28102811

28112812
devptr->exts_next = ExtCurStyle->exts_device[t];
28122813
ExtCurStyle->exts_device[t] = devptr;

0 commit comments

Comments
 (0)