summaryrefslogtreecommitdiff
path: root/scripts/update_device.py
diff options
context:
space:
mode:
authorJae Hoon Kim <kimjae@chromium.org>2020-05-20 19:26:19 -0700
committerCommit Bot <commit-bot@chromium.org>2020-05-21 20:54:21 +0000
commit3f894a81f130a9ba37e4bc710f5214b65981c6d2 (patch)
tree56f40ca47fd3b1398a0f691c2697a78afc86fe51 /scripts/update_device.py
parent975e86643939308559293ee1562a654cf874f259 (diff)
update_engine: Fix ubsan error for undefined-behavior
The error: "runtime error: applying non-zero offset 224 to null pointer" Incrementing past the |std::vector<T>::end()| is undefined behavior, hence we must check before assigning the |second| variable based off of |first| because |first| may be |std::vector<T>::end()|. BUG=chromium:1067975 TEST=USE="${USE} ubsan" FEATURES=test P2_TEST_FILTER=*EmptyFilesystemTest*-*RunAsRoot* emerge-$B update_engine Change-Id: I9fb2a213464755c4cf115dc5ba3e658a927d0262 Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2210979 Tested-by: Jae Hoon Kim <kimjae@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org> Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
Diffstat (limited to 'scripts/update_device.py')
0 files changed, 0 insertions, 0 deletions