diff options
| author | 刘学利 <[email protected]> | 2023-09-04 01:58:12 +0000 |
|---|---|---|
| committer | 刘学利 <[email protected]> | 2023-09-04 01:58:12 +0000 |
| commit | 81307dfc57764bc3c175807e40728ece18ecbdbb (patch) | |
| tree | 7fbf157906ac1a83b2d9fbe1b91cac16f0b334e5 /src | |
| parent | e949298f0fd6d5e609312eab6b502e00f65c74ab (diff) | |
TSG-16806: 修复删除空格时出现非法读的问题,某种情况下last_pos小于frist_pos时,访问*last_pos出现非法读v2.0.16
Diffstat (limited to 'src')
| -rw-r--r-- | src/HTTP_Message_Header.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/HTTP_Message_Header.c b/src/HTTP_Message_Header.c index 254d7a3..e890990 100644 --- a/src/HTTP_Message_Header.c +++ b/src/HTTP_Message_Header.c @@ -302,7 +302,7 @@ static void http_reseaseHttpInforList(http_parser_t**a_http, UINT16 uncomplete_c /********************************************************** * ���ܣ��ͷŽڵ㡣 * a_http:��ǰ�ڵ㡣 - * curdir����ǰ���ݵķ��� + * curdir����ǰ���ݵķ���? * delete cur_node when http_infor be proccessd over * the different with http_releaseHttpLinkNode:http_reseaseHttpInfor is delete cur_node,and proc prev and next **********************************************************/ @@ -503,10 +503,10 @@ uchar http_tripleMatching(http_parser_t *cur_http_node, http_stream* a_http_stre last_pos = last_http_pos-1; - while(*last_pos==HTTP_SP && last_pos>frist_pos) + while(last_pos>frist_pos && *last_pos==HTTP_SP) { last_pos--; - } + } /*last_pos-first_pos to make sure url != NULL*/ if(last_pos-frist_pos>0) |
