summaryrefslogtreecommitdiff
path: root/cpp/RenderScript.cpp
diff options
context:
space:
mode:
authorMatt Wala <wala@google.com>2015-07-10 16:40:12 -0700
committerMatt Wala <wala@google.com>2015-07-10 16:40:12 -0700
commit11fd9ec1ab8dfa7ae45c6edeea48dddc4633efea (patch)
treee4220a62bcabfad430e6bfc76f8bb2f324fcb409 /cpp/RenderScript.cpp
parent5bf7ace8e25ca0c93822492c9ad7caed70a7c594 (diff)
CPU ref: Fix potential buffer over-read / uninitialized memory access.
GetCpuInfo() was reading /proc/cpuinfo into a string without properly null terminating the result. The resulting unterminated string was being passed to strstr(). Change the code to read the file with fgets(), which ensures the result is null terminated. Also, document the GetCpuInfo() function and the global variable that it sets. Change-Id: I041331fdc25d79217ff7c1bf36a4aff2be8e0192
Diffstat (limited to 'cpp/RenderScript.cpp')
0 files changed, 0 insertions, 0 deletions