OSDN Git Service

Fix potential OOB read in sdpu_get_len_from_type
authorTed Wang <tedwang@google.com>
Mon, 29 Apr 2019 02:11:04 +0000 (10:11 +0800)
committerZongheng Wang <wangzongheng@google.com>
Wed, 18 Sep 2019 19:29:40 +0000 (19:29 +0000)
commitfa800d23fa032097c74593f5bd617dbbab043936
tree93678fdd040878d891c414a630d5ccbcf09bf8c8
parent4291c84baac0d18d2b855dc9df52768fc0367a7a
Fix potential OOB read in sdpu_get_len_from_type

Add boundary check in sdpu_get_len_from_type to prevent potential OOB read.

(This commit was skipped from oc-dr1-dev down, so the Merged-In tag is
from a later CL to avoid a conflict)

Bug: 117105007
Test: Manul
Change-Id: I1bb50e840a977df1c0403f3cce2d73dd1a73aa62
Merged-In: I9f0df8b2de28970e7d69b737ce5d363785183bf3
(cherry picked from commit 1243f8da338dadfe2a3c281a08297b431402d41c)
(cherry picked from commit 4d8e1d63e1a2116c47702d38d858f5a742e8292f)
stack/sdp/sdp_db.cc
stack/sdp/sdp_discovery.cc
stack/sdp/sdp_utils.cc
stack/sdp/sdpint.h