commit | cb2ecc3156b2106b84d436dd6fcb696efd76ccce | [log] [tgz] |
---|---|---|
author | Michael Wright <michaelwr@google.com> | Fri Jun 03 16:09:53 2016 +0100 |
committer | Michael Wright <michaelwr@google.com> | Fri Jun 03 16:09:53 2016 +0100 |
tree | a733ac45e0d3cb3c2f838ba6fa910ea530dd051d | |
parent | df8398cf7a21d512d36d64d896f90e1d04bbc95f [diff] |
Don't clobber the last null terminator when reading /proc/cmdline. Right now, if /proc/cmdline is larger than the buffer size (1024) then the read will overwrite all of the null terminators and the ensuing strstr calls will continue past the end of the buffer. Bug: 29115540 Change-Id: I2da2f28edabd7926d40dbcea52ebaf7165c44e04