am 1c5ca642: NULL terminate device unique ID before use

* commit '1c5ca642cb2021ffcdd253d929e40c393cf3fe07':
  NULL terminate device unique ID before use
This commit is contained in:
Jeff Tinker
2013-12-27 12:54:33 -08:00
committed by Android Git Automerger

View File

@@ -155,6 +155,9 @@ bool CryptoSession::GetDeviceUniqueId(std::string* device_id) {
return false; return false;
} }
id.resize(id_length + 1);
id[id_length] = '\0';
*device_id = reinterpret_cast<const char*>(&id[0]); *device_id = reinterpret_cast<const char*>(&id[0]);
return true; return true;
} }