commit | 29e0709d87fee6eed7fce3ae1e00da514e3cf1d3 | [log] [tgz] |
---|---|---|
author | Krishna Kurapati <quic_kriskura@quicinc.com> | Wed Dec 06 09:47:59 2023 +0530 |
committer | Prashanth K <quic_prashk@quicinc.com> | Wed Dec 06 14:14:53 2023 +0530 |
tree | 925006265e8b121c35957480fa79c2c6caf54bfd | |
parent | 4a4539183fb73c0690fe9a746757348ff3efd6ec [diff] |
hal: Usb: Handle failure cases for readFile during autosuspend check In the event readFile fails to open file for checking interface class, the return value is not checked. Instead only data length is checked. Invoking stoi on this wrong string saw a SIGABRT crash. Initialize the string to be read to be an empty string so that if fopen fails the length check ensures we don't access any invalid or corrupt data. Change-Id: If2c3b081e9de5c4c801d98fe631c1ac997a2d9ba