Commit 684baff
committed
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: Robert Lubos <[email protected]>1 parent 1aa18e3 commit 684baff
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1943 | 1943 | | |
1944 | 1944 | | |
1945 | 1945 | | |
1946 | | - | |
| 1946 | + | |
| 1947 | + | |
1947 | 1948 | | |
1948 | 1949 | | |
1949 | 1950 | | |
| |||
0 commit comments