Commit 441411c
committed
BUG: fix UB - strides can be negative, so use signed types for strides math
UBSan report:
```
../pywt/_extensions/c/wt.template.c:105:43: runtime error: addition of unsigned offset to 0x60d00022bbd0 overflowed to 0x60d00022bba0
pywt/tests/test_multidim.py::test_dwdtn_idwtn_allwavelets PASSED
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../pywt/_extensions/c/wt.template.c:105:43
Fatal
```1 parent e681add commit 441411c
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | | - | |
| 90 | + | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
| |||
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
235 | | - | |
236 | | - | |
| 234 | + | |
237 | 235 | | |
238 | 236 | | |
239 | 237 | | |
| |||
242 | 240 | | |
243 | 241 | | |
244 | 242 | | |
245 | | - | |
| 243 | + | |
246 | 244 | | |
247 | 245 | | |
248 | 246 | | |
| |||
0 commit comments