projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd96330
)
fix heap corruption if HTTP callback calls libwebsocket_close_and_free_session
author
Nick Dowell
<nick@nickdowell.com>
Thu, 5 Apr 2012 02:29:29 +0000
(10:29 +0800)
committer
Andy Green
<andy.green@linaro.org>
Thu, 5 Apr 2012 02:29:29 +0000
(10:29 +0800)
Signed-off-by: Nick Dowell <nick@nickdowell.com>
lib/handshake.c
patch
|
blob
|
history
diff --git
a/lib/handshake.c
b/lib/handshake.c
index
dca2e14
..
6809be4
100644
(file)
--- a/
lib/handshake.c
+++ b/
lib/handshake.c
@@
-596,11
+596,11
@@
libwebsocket_read(struct libwebsocket_context *context, struct libwebsocket *wsi
if (!wsi->utf8_token[WSI_TOKEN_UPGRADE].token_len ||
!wsi->utf8_token[WSI_TOKEN_CONNECTION].token_len) {
+ wsi->state = WSI_STATE_HTTP;
if (wsi->protocol->callback)
(wsi->protocol->callback)(context, wsi,
LWS_CALLBACK_HTTP, wsi->user_space,
wsi->utf8_token[WSI_TOKEN_GET_URI].token, 0);
- wsi->state = WSI_STATE_HTTP;
return 0;
}