OSDN Git Service
(root)
/
android-x86
/
hardware-ril.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0eb4fba
)
Initialize the buffer
author
Sanket Padawe
<sanketpadawe@google.com>
Wed, 27 Jan 2016 01:32:50 +0000
(17:32 -0800)
committer
Sanket Padawe
<sanketpadawe@google.com>
Wed, 27 Jan 2016 01:32:50 +0000
(17:32 -0800)
Initialize the char array to null character
as there is a possibility that it is not null
terminated
BUG=
21063589
Change-Id: I00cc699795c5c266ac7adae2a0ce6f13ee187e1f
rild/rild.c
patch
|
blob
|
history
diff --git
a/rild/rild.c
b/rild/rild.c
index
c63da38
..
bf9c421
100644
(file)
--- 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);