Commit f4fc0d8
authored
host_cmd: zero-initialize response buffer (#215)
Unit tests that don't appropriately mock host command responses in
`libhoth_receive_response` will cause `resp.hdr` and `resp.payload_buf` to be
uninitialized.
Using `resp` in
```c
status = validate_ec_response_header(&resp.hdr, resp.payload_buf, resp_size);
```
will access uninitialized memory.1 parent 691f27f commit f4fc0d8
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
| 189 | + | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
0 commit comments