summaryrefslogtreecommitdiff
path: root/src/quic_process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quic_process.cpp')
-rw-r--r--src/quic_process.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quic_process.cpp b/src/quic_process.cpp
index fa8c242..833c931 100644
--- a/src/quic_process.cpp
+++ b/src/quic_process.cpp
@@ -376,7 +376,11 @@ int parse_quic_transport_parameter(struct quic_client_hello *client_hello, const
para_offset+=copy_extension_tag(quic_para+para_offset, one_para_length, &client_hello->user_agent, thread_seq);
return 1;
default:
- one_para_length=quic_para[para_offset++]; // length=1
+ one_para_length=(int)(quic_para[para_offset++]); // length=1
+ if(one_para_length<0 || one_para_length>quic_para_len)
+ {
+ break;
+ }
para_offset+=one_para_length;
break;
}