File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1601,6 +1601,8 @@ TLS-parse-handshake-message: function [
1601
1601
data [binary! ]
1602
1602
] [
1603
1603
msg: binary data
1604
+ ;@@ There may be more fragments in one message!
1605
+ while [4 <= length? msg/buffer ][
1604
1606
binary/read msg [type: UI8 len: UI24 start: INDEX]
1605
1607
ends: start + len
1606
1608
log-debug ["R[" ctx/seq-read "] length:" len "start:" start "ends:" ends "type:" type]
@@ -1934,12 +1936,14 @@ TLS-parse-handshake-message: function [
1934
1936
log-error ["Unknown state: " ctx/state "-" type]
1935
1937
return 'Unexpected_message
1936
1938
]
1937
-
1939
+ ;; validate fragment's tail..
1938
1940
if ends <> i: index? msg/buffer [
1939
1941
log-error ["Wrong fragment message tail!" ends "<>" i]
1940
1942
log-error ["in/buffer starts:" copy/part msg/buffer 20 ]
1941
1943
return 'Record_overflow
1942
1944
]
1945
+ ] ;; more messages?
1946
+
1943
1947
log-more ["R[" ctx/seq-read "] DONE: handshake^[ [1m" ctx/state ] log-----
1944
1948
false ;= no error
1945
1949
]
You can’t perform that action at this time.
0 commit comments