summaryrefslogtreecommitdiff
path: root/scripts/update_payload/checker_unittest.py
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2018-02-02 15:57:16 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-02-03 04:44:09 -0800
commit6d2c71e261e331def8d41caea5a254f6312ece76 (patch)
tree491bf636dff535f7e6ca425f305f9e7848d0c2b7 /scripts/update_payload/checker_unittest.py
parentf94b643ff1bb0f07204ec9f15289b55ac5fedacd (diff)
update_engine: Fix a stack use after scope issue.
GetCStr() returns the contents to a local string returned by Get(). The string is destroyed after the call to GetCStr() so the pointer passed to atoi() is not valid. Change Get() to return a reference instead so that it will stay valid for lifetime of atoi(). BUG=chromium:808686 TEST=No more asan complains. Change-Id: Icc62064f4f3382a29ccbd36ca90f9952cf149364 Reviewed-on: https://chromium-review.googlesource.com/899512 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org>
Diffstat (limited to 'scripts/update_payload/checker_unittest.py')
0 files changed, 0 insertions, 0 deletions