Commit a61b033
committed
qed: fix possible uninit pointer read in qed_mcp_nvm_info_populate()
JIRA: https://issues.redhat.com/browse/RHEL-72637
Coverity reports an uninit pointer read in qed_mcp_nvm_info_populate().
If EOPNOTSUPP is returned from qed_mcp_bist_nvm_get_num_images() ensure
nvm_info.num_images is set to 0 to avoid possible uninit assignment
to p_hwfn->nvm_info.image_att later on in out label.
Closes: https://scan5.scan.coverity.com/#/project-view/63204/10063?selectedIssue=1636666
Suggested-by: Simon Horman <horms@kernel.org>
Signed-off-by: Gianfranco Trad <gianf.trad@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241215011733.351325-2-gianf.trad@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
(cherry picked from commit 7ed2d91)
Signed-off-by: John Meneghini <jmeneghi@redhat.com>1 parent 60f24a1 commit a61b033
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3358 | 3358 | | |
3359 | 3359 | | |
3360 | 3360 | | |
| 3361 | + | |
3361 | 3362 | | |
3362 | 3363 | | |
3363 | 3364 | | |
| |||
0 commit comments