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 (cherry picked from commit 9125d82010f6c7e15b0e6b8664e5c0734e569406)
This commit is contained in:
parent
fa83dd4a00
commit
60f9df425b
@ -2,6 +2,15 @@
|
|||||||
Version 1.6.16
|
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>
|
2012-02-24 Marcelo Roberto Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
|
|
||||||
SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe()
|
SF Bug Tracker id 3489999 - UpnpString leaks in genaSubscribe()
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003 Intel Corporation
|
* Copyright (c) 2000-2003 Intel Corporation
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2012 France Telecom All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
@ -1303,6 +1304,16 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
|||||||
HTTP_SUCCESS ) {
|
HTTP_SUCCESS ) {
|
||||||
return PARSE_FAILURE;
|
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 */
|
/* scan version */
|
||||||
save_char = version_str.buf[version_str.length];
|
save_char = version_str.buf[version_str.length];
|
||||||
version_str.buf[version_str.length] = '\0'; /* null-terminate */
|
version_str.buf[version_str.length] = '\0'; /* null-terminate */
|
||||||
@ -1320,15 +1331,6 @@ parser_parse_requestline( INOUT http_parser_t * parser )
|
|||||||
return PARSE_FAILURE;
|
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;
|
hmsg->method = Http_Method_Table[index].id;
|
||||||
parser->position = POS_HEADERS; /* move to headers */
|
parser->position = POS_HEADERS; /* move to headers */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user