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
2 files changed