Commit d3d3e7e
Fix the cppcheck findings
Four sites re-tested an unchanged ret after a WOLFSSH_SMALL_STACK
allocation, which cppcheck reports as identicalInnerCondition because the
allocation that can change ret is compiled out in the default build. Test
the allocated pointer instead; that is what the check is guarding.
- certman.c, keygen.c and wolfsshd/auth.c: check the DecodedCert, MlDsaKey
and DecodedCert pointers.
- internal.c CompositeEccSign: give the fixed-buffer build pointer aliases
so both builds have the same shape, then check the r/s pointers.
- port.c: initialize fileHandle, which is only assigned when mbstowcs_s
succeeds.
- wolfsftp.c: zero localTime before WLOCALTIME, which is a per-port macro.1 parent a98fbdd commit d3d3e7e
6 files changed
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2695 | 2695 | | |
2696 | 2696 | | |
2697 | 2697 | | |
2698 | | - | |
2699 | | - | |
| 2698 | + | |
| 2699 | + | |
2700 | 2700 | | |
2701 | 2701 | | |
2702 | 2702 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
| 408 | + | |
408 | 409 | | |
409 | 410 | | |
410 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21926 | 21926 | | |
21927 | 21927 | | |
21928 | 21928 | | |
21929 | | - | |
21930 | | - | |
| 21929 | + | |
| 21930 | + | |
| 21931 | + | |
| 21932 | + | |
21931 | 21933 | | |
21932 | 21934 | | |
21933 | | - | |
| 21935 | + | |
| 21936 | + | |
21934 | 21937 | | |
21935 | 21938 | | |
21936 | 21939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
| 316 | + | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3151 | 3151 | | |
3152 | 3152 | | |
3153 | 3153 | | |
| 3154 | + | |
| 3155 | + | |
| 3156 | + | |
3154 | 3157 | | |
3155 | 3158 | | |
3156 | 3159 | | |
| |||
0 commit comments