Skip to content

Fix possible UB in int4 handling

Emil Ohlsson requested to merge emil/int4-fix into main

It is undefined behavior to left shift a negative value, and the function Int4::pack_u4() run the risk of doing that while packing. This change fixes this possible issue by using an intermediate uint8_t.

Signed-off-by: Emil Ohlsson emil.ohlsson@arm.com

Merge request reports

Loading