diff options
author | Sindhu Kanathur <skanat@codeaurora.org> | 2013-12-10 15:03:17 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:20:15 -0600 |
commit | ea02418cbc8582c7896781e63d2fc7e824710cab (patch) | |
tree | 7ee7623d392c2788c382ebf5625969e581c51bf9 | |
parent | 310ce7080ed4fcdfc15a6153f1b2f9cf9ce44d98 (diff) | |
download | android_hardware_ril-ea02418cbc8582c7896781e63d2fc7e824710cab.tar.gz android_hardware_ril-ea02418cbc8582c7896781e63d2fc7e824710cab.tar.bz2 android_hardware_ril-ea02418cbc8582c7896781e63d2fc7e824710cab.zip |
Initialize the buffer
Initialize the char array to null character
as there is a possibility that it is not null
terminated
Change-Id: If1eca2b2f3ec22bafeb303da02deb62f0655241c
CRs-Fixed: 584311
-rw-r--r-- | rild/rild.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rild/rild.c b/rild/rild.c index c63da38..bf9c421 100644 --- a/rild/rild.c +++ b/rild/rild.c @@ -200,7 +200,7 @@ int main(int argc, char **argv) { #define REFERENCE_RIL_PATH "libreference-ril.so" /* first, read /proc/cmdline into memory */ - char buffer[1024], *p, *q; + char buffer[1024] = {'\0'}, *p, *q; int len; int fd = open("/proc/cmdline",O_RDONLY); |