This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Commit 996c253
committed
libgraphics: Correct error handling in MCGPathIterate()
In `MCGPathIterate()`, the `t_success` flag was not checked before
invoking the `p_callback`. If the default case in the `switch` block
was hit, this resulted in calling `p_callback` with uninitialised
values from the stack.
This patch addresses the issue in two ways:
- All values in the stack are initialised at acquisition
- The function now returns immediately on encountering a problem; the
`t_success` flag has been removed entirely1 parent 1f2f6a7 commit 996c253
1 file changed
+9
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1163 | 1163 | | |
1164 | 1164 | | |
1165 | 1165 | | |
1166 | | - | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
| 1166 | + | |
1170 | 1167 | | |
1171 | | - | |
1172 | | - | |
| 1168 | + | |
| 1169 | + | |
1173 | 1170 | | |
1174 | 1171 | | |
1175 | 1172 | | |
1176 | 1173 | | |
1177 | 1174 | | |
1178 | 1175 | | |
1179 | 1176 | | |
1180 | | - | |
| 1177 | + | |
1181 | 1178 | | |
| 1179 | + | |
1182 | 1180 | | |
1183 | 1181 | | |
1184 | 1182 | | |
| |||
1219 | 1217 | | |
1220 | 1218 | | |
1221 | 1219 | | |
1222 | | - | |
1223 | | - | |
| 1220 | + | |
1224 | 1221 | | |
1225 | | - | |
1226 | | - | |
| 1222 | + | |
| 1223 | + | |
1227 | 1224 | | |
1228 | 1225 | | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
| 1226 | + | |
1233 | 1227 | | |
0 commit comments