Commit 06516e3
int: Address safety warnings in pvt::append_tiff_dir_entry (AcademySoftwareFoundation#4737)
I think what we were doing here was fine all along, but the idiom was
confusing to static analyzers who identified a danger that we were
memcpy'ing into a field that was potentially not big enough. A minor
restructuring of the code and a new assertion should verify that it's
safe and also make it clear to the static analyzer that we aren't
falling into the case it warned about.
Signed-off-by: Larry Gritz <[email protected]>
Signed-off-by: Scott Wilson <[email protected]>1 parent 598a5d9 commit 06516e3
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
| 1095 | + | |
1095 | 1096 | | |
1096 | 1097 | | |
1097 | 1098 | | |
1098 | 1099 | | |
1099 | 1100 | | |
1100 | 1101 | | |
1101 | 1102 | | |
| 1103 | + | |
1102 | 1104 | | |
1103 | | - | |
| 1105 | + | |
1104 | 1106 | | |
1105 | 1107 | | |
1106 | 1108 | | |
| |||
0 commit comments