Messages in this thread | ![/](/images/icornerl.gif) | | Date | Tue, 12 Dec 2023 13:34:56 -0800 | From | Kees Cook <> | Subject | Re: [PATCH v2 1/2] VMCI: Remove handle_arr_calc_size() |
| |
On Sat, Dec 09, 2023 at 01:36:14PM +0100, Christophe JAILLET wrote: > Use struct_size() instead of handle_arr_calc_size(). > This is much more conventional. > > While at it, use size_add() when computing the needed size in > vmci_handle_arr_append_entry(). This prevents from (unlikely) overflow > when computing the new size to reallocate. > > Suggested-by: Kees Cook <keescook@chromium.org> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Kees Cook <keescook@chromium.org>
-- Kees Cook
| ![\](/images/icornerr.gif) |