Commit 845c3fd
committed
Fix null pointer dereference in STEPattributeList operator[]
Improves error handling in STEPattributeList operator[] - return an
error attribute and set error state rather than trying to rely on
crashing via a NULL deference. That's undefined behavior, so it
was not guaranteed - this requires the calling code to check the
return, but is *much* cleaner.
Co-authored-by: starseeker <238416+starseeker@users.noreply.github.com>1 parent 6cbc18b commit 845c3fd
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
0 commit comments