OSDN Git Service

Don't clobber the last null terminator when reading /proc/cmdline.
authorMichael Wright <michaelwr@google.com>
Fri, 3 Jun 2016 15:09:53 +0000 (16:09 +0100)
committerMichael Wright <michaelwr@google.com>
Fri, 3 Jun 2016 15:09:53 +0000 (16:09 +0100)
commitcb2ecc3156b2106b84d436dd6fcb696efd76ccce
treea733ac45e0d3cb3c2f838ba6fa910ea530dd051d
parentdf8398cf7a21d512d36d64d896f90e1d04bbc95f
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
rild/rild.c