Skip to content
Commit 31b79a93 authored by Robert Lubos's avatar Robert Lubos Committed by Daniel DeGrasse
Browse files

net: pkt: Add explicit casts to uint32_t when bitshifting uint8_t val



Cast uint8_t variable to uint32_t explicitly to avoid implicit cast to
int, and thus potentially undefined behavior, reported by UBSAN:

  net_pkt.c:1946:17: runtime error: left shift of 239 by 24 places
  cannot be represented in type 'int'

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 7949789c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment