SF Bug Tracker id 3494865 - Use of non-initialized variable in parser_parse_requestline
Submitted: Marcelo Roberto jimenez ( mroberto ) - 2012-02-26 16:50:23 PST src/genlib/net/http/httpparser.c: In function ‘parser_parse_requestline’: src/genlib/net/http/httpparser.c:1319:28: warning: ‘index’ may be used uninitialized in this function
This commit is contained in:
parent
36c02bba26
commit
9125d82010
@ -299,6 +299,15 @@ Version 1.8.0
|
||||
Version 1.6.16
|
||||
*******************************************************************************
|
||||
|
||||
2012-02-27 Fabrice Fontaine <fabrice.fontaine(at)orange.com>
|
||||
|
||||
SF Bug Tracker id 3494865 - Use of non-initialized variable in parser_parse_requestline
|
||||
|
||||
Submitted: Marcelo Roberto Jimenez ( mroberto ) - 2012-02-26 16:50:23 PST
|
||||
|
||||
src/genlib/net/http/httpparser.c: In function ‘parser_parse_requestline’:
|
||||
src/genlib/net/http/httpparser.c:1319:28: warning: ‘index’ may be used uninitialized in this function
|
||||
|
||||
2012-02-24 Marcelo Roberto Jimenez <mroberto(at)users.sourceforge.net>
|
||||
|
||||
SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe()
|
||||
|
@ -2,6 +2,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2003 Intel Corporation
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@ -1305,6 +1306,16 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
||||
HTTP_SUCCESS ) {
|
||||
return PARSE_FAILURE;
|
||||
}
|
||||
|
||||
index =
|
||||
map_str_to_int( method_str.buf, method_str.length,
|
||||
Http_Method_Table, NUM_HTTP_METHODS, TRUE );
|
||||
if( index < 0 ) {
|
||||
/* error; method not found */
|
||||
parser->http_error_code = HTTP_NOT_IMPLEMENTED;
|
||||
return PARSE_FAILURE;
|
||||
}
|
||||
|
||||
/* scan version */
|
||||
save_char = version_str.buf[version_str.length];
|
||||
version_str.buf[version_str.length] = '\0'; /* null-terminate */
|
||||
@ -1322,15 +1333,6 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
||||
return PARSE_FAILURE;
|
||||
}
|
||||
|
||||
index =
|
||||
map_str_to_int( method_str.buf, method_str.length,
|
||||
Http_Method_Table, NUM_HTTP_METHODS, TRUE );
|
||||
if( index < 0 ) {
|
||||
/* error; method not found */
|
||||
parser->http_error_code = HTTP_NOT_IMPLEMENTED;
|
||||
return PARSE_FAILURE;
|
||||
}
|
||||
|
||||
hmsg->method = Http_Method_Table[index].id;
|
||||
parser->position = POS_HEADERS; /* move to headers */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user