projects
/
platform
/
core
/
api
/
http.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6655f06
)
[SATIZENVUL-1600] Fix overflow in malloc
93/188393/1
accepted/tizen/unified/20180905.060849
submit/tizen/20180904.232123
author
Seonah Moon
<seonah1.moon@samsung.com>
Tue, 4 Sep 2018 11:01:32 +0000
(20:01 +0900)
committer
Seonah Moon
<seonah1.moon@samsung.com>
Tue, 4 Sep 2018 11:01:37 +0000
(20:01 +0900)
Change-Id: I16d50d9c586dc6df1b5713a844a29beaf1d96559
src/http_common.c
patch
|
blob
|
history
diff --git
a/src/http_common.c
b/src/http_common.c
index
5751b6d
..
34ace4d
100644
(file)
--- a/
src/http_common.c
+++ b/
src/http_common.c
@@
-287,6
+287,9
@@
gchar* parse_values(const gchar* string, int from_index, int to_index)
gchar* str = NULL;
int cur_index = to_index - from_index;
+ if (to_index < from_index)
+ return NULL;
+
str = (gchar*) malloc(cur_index + 1);
if (str) {
memset(str, '\0', cur_index + 1);