From 908785fba779bd5ea0bcf7b6a19a9bf345d37eb3 Mon Sep 17 00:00:00 2001 From: Peng Date: Fri, 8 Nov 2013 09:39:45 +0800 Subject: [PATCH] Fix return value check of parse_uri Signed-off-by: Marcelo Roberto Jimenez --- ChangeLog | 4 ++++ upnp/src/genlib/service_table/service_table.c | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index befec8a..a3db6d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Version 1.6.19 ******************************************************************************* +2013-11-08 Peng + + Fix return value check of parse_uri. + 2012-06-19 Yoichi NAKAYAMA SF Bug Tracker #118, Creator: T.Iwamoto diff --git a/upnp/src/genlib/service_table/service_table.c b/upnp/src/genlib/service_table/service_table.c index 5b173f3..2e780f6 100644 --- a/upnp/src/genlib/service_table/service_table.c +++ b/upnp/src/genlib/service_table/service_table.c @@ -301,15 +301,16 @@ FindServiceEventURLPath( service_table * table, if( ( table ) && - ( parse_uri - ( eventURLPath, strlen( eventURLPath ), &parsed_url_in ) ) ) { + ( parse_uri( eventURLPath, + strlen( eventURLPath ), + &parsed_url_in ) == HTTP_SUCCESS ) ) { finger = table->serviceList; while( finger ) { if( finger->eventURL ) if( ( parse_uri ( finger->eventURL, strlen( finger->eventURL ), - &parsed_url ) ) ) { + &parsed_url ) == HTTP_SUCCESS ) ) { if( !token_cmp ( &parsed_url.pathquery, @@ -354,13 +355,13 @@ FindServiceControlURLPath( service_table * table, && ( parse_uri ( controlURLPath, strlen( controlURLPath ), - &parsed_url_in ) ) ) { + &parsed_url_in ) == HTTP_SUCCESS ) ) { finger = table->serviceList; while( finger ) { if( finger->controlURL ) if( ( parse_uri ( finger->controlURL, strlen( finger->controlURL ), - &parsed_url ) ) ) { + &parsed_url ) == HTTP_SUCCESS) ) { if( !token_cmp ( &parsed_url.pathquery, &parsed_url_in.pathquery ) )