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:
d58353f
)
service: always restrict rx to serve_buf_size
author
Andy Green
<andy@warmcat.com>
Tue, 28 Mar 2017 00:51:37 +0000
(08:51 +0800)
committer
Andy Green
<andy@warmcat.com>
Wed, 29 Mar 2017 00:22:19 +0000
(08:22 +0800)
lib/service.c
patch
|
blob
|
history
diff --git
a/lib/service.c
b/lib/service.c
index
88e7d08
..
6a42dd2
100644
(file)
--- a/
lib/service.c
+++ b/
lib/service.c
@@
-1064,6
+1064,9
@@
read:
eff_buf.token_len = context->pt_serv_buf_size;
}
+ if (eff_buf.token_len > context->pt_serv_buf_size)
+ eff_buf.token_len = context->pt_serv_buf_size;
+
eff_buf.token_len = lws_ssl_capable_read(wsi,
(unsigned char *)eff_buf.token, pending ? pending :
eff_buf.token_len);