Commit 85c5202a authored by Calin Juravle's avatar Calin Juravle
Browse files

Fix broken pointer overflow check ns_name_unpack()

Many compilers may optimize away the overflow check `msg + l < msg',
where `msg' is a pointer and `l' is an integer, because pointer
overflow is undefined behavior in C.

Use a safe precondition test `l >= eom - msg' instead.
Bug: 13219633

Change-Id: I3fca2125834073cc36d7e9c4e586e97842265a59
parent fcb502e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment