projects
/
platform
/
upstream
/
openconnect.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d08bf0
)
NUL-terminate blobs from Andoird keystore
author
David Woodhouse
<David.Woodhouse@intel.com>
Tue, 19 Jun 2012 12:37:38 +0000
(13:37 +0100)
committer
David Woodhouse
<David.Woodhouse@intel.com>
Tue, 19 Jun 2012 12:38:07 +0000
(13:38 +0100)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
ssl.c
patch
|
blob
|
history
diff --git
a/ssl.c
b/ssl.c
index
d6fe693
..
4c7e30b
100644
(file)
--- a/
ssl.c
+++ b/
ssl.c
@@
-389,7
+389,7
@@
int keystore_fetch(const char *key, unsigned char **result)
goto out_fd;
}
- data = malloc(st.st_size);
+ data = malloc(st.st_size
+ 1
);
if (!data) {
ret = -ENOMEM;
goto out_fd;
@@
-400,6
+400,8
@@
int keystore_fetch(const char *key, unsigned char **result)
free(data);
goto out_fd;
}
+
+ data[st.st_size] = 0;
*result = data;
ret = st.st_size;
out_fd: