You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
patch 9.2.0283: unnecessary (int) casts before alloc() calls
Problem: unnecessary (int) casts before alloc() calls, can cause
truncation and heap overflows (sgInnora)
Solution: Remove casts (Yasuhiro Matsumoto)
alloc() already accepts size_t, so (int) casts on size_t values are
redundant and could theoretically cause truncation on values > INT_MAX.
Remove the casts and change alloc_cmdbuff() signature from int to
size_t to match.
Note: list_alloc_with_items() keeps its int parameter since lv_len and
lv_with_items are int, and the call site already has an INT_MAX guard.
fixes: #19888
closes: #19889
Signed-off-by: Yasuhiro Matsumoto <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
0 commit comments