Skip to content
Commit 7d7f8fe4 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mathieu Poirier
Browse files

remoteproc: Harden rproc_handle_vdev() against integer overflow



The struct_size() macro protects against integer overflows but adding
"+ rsc->config_len" introduces the risk of integer overflows again.
Use size_add() to be safe.

Fixes: c8784657 ("remoteproc: use struct_size() helper")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: default avatarMukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/YyMyoPoGOJUcEpZT@kili


Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent fa25b944
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment