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:
96d61f0
)
Handle allocation failure in HTTP 1.0 loop
author
David Woodhouse
<David.Woodhouse@intel.com>
Mon, 22 Feb 2010 14:09:25 +0000
(14:09 +0000)
committer
David Woodhouse
<David.Woodhouse@intel.com>
Mon, 22 Feb 2010 14:09:25 +0000
(14:09 +0000)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
http.c
patch
|
blob
|
history
diff --git
a/http.c
b/http.c
index
2072001
..
2084e88
100644
(file)
--- a/
http.c
+++ b/
http.c
@@
-269,9
+269,13
@@
static int process_http_response(struct openconnect_info *vpninfo, int *result,
/* HTTP 1.0 response. Just eat all we can in 16KiB chunks */
while (1) {
body = realloc(body, done + 16384);
+ if (!body)
+ return -ENOMEM;
i = SSL_read(vpninfo->https_ssl, body + done, 16384);
if (i <= 0) {
body = realloc(body, done + 1);
+ if (!body)
+ return -ENOMEM;
break;
}
done += i;