diff options
author | Sindhu Kanathur <skanat@codeaurora.org> | 2013-12-10 15:03:17 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2014-11-27 00:39:32 -0800 |
commit | 5abb373f459983e754725471bccc7b31013963d4 (patch) | |
tree | 95b5d67de85fcef6c520966fc504a0d878b99ca0 | |
parent | a55174e830914aa6009e80e80e69a1a8005e0a5b (diff) | |
download | android_hardware_ril-5abb373f459983e754725471bccc7b31013963d4.tar.gz android_hardware_ril-5abb373f459983e754725471bccc7b31013963d4.tar.bz2 android_hardware_ril-5abb373f459983e754725471bccc7b31013963d4.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 88469b3..1407e12 100644 --- a/rild/rild.c +++ b/rild/rild.c @@ -187,7 +187,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); |