Conversation
4013acd to
1741ff3
Compare
|
is this patches tested on actual target ? Please confirm. don't want to break existing setup, please update the PR description on which target tested this change |
|
|
||
| if (hdr->opcode == APM_CMD_RSP_GET_SPF_STATE) { | ||
| result = data->payload; | ||
| spf_status = (struct apm_cmd_rsp_get_spf_status_t *)(pkt+hdr_size); |
There was a problem hiding this comment.
spf_status is a struct, but you’re assigning a pointer to it and later dereferencing as spf_status->status. This is undefined and will likely crash.
Use‑before‑init for pkt / hdr_size : pkt and hdr_size are used without initializing.
Does this patch is validated , before submitting ?
There was a problem hiding this comment.
with respect to spf_status structure pointer, fixed this on a follow-up commit had issue syncing changes in fork with PR.
For the query on Use-Before-init for "hdr_size" & "pkt" pointer , line 607 & line 623-628 have these initialized and setup for usage on line 653.
Playback and Capture use case has been validated on Rb3Gen2, with this change.
1741ff3 to
f2c1b6e
Compare
Playback and Capture use case has been validated on Rb3Gen2, with this change. |
f2c1b6e to
1176f55
Compare
This change fixes SPF state handling. Previously opcode was forced in as the spf status queried which always is a positive numerical, not tracking the spf status accurately.
We fix here the status decoding by extracting status out of payload and refining the wait logic to signal after setting the status flags.
Playback and Capture use case has been validated on Rb3Gen2, with this change.