From 75fdad110849c97657313c754941f55a27dd3631 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 6 Mar 2012 00:13:46 +0100 Subject: [PATCH] SF Bug Tracker id 3497140 - Bug fix in http_get_code_text Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 13:07:03 PST Replace if( statusCode < 100 && statusCode >= 600 ) which can't be true by if( statusCode < 100 || statusCode >= 600 ). (cherry picked from commit 1a1570fe0fa95bfc80b74de65e80dff9b7565b9e) --- ChangeLog | 9 +++++++++ upnp/src/genlib/net/http/statcodes.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5523c69..2a6e23e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -359,6 +359,15 @@ Version 1.6.16 The problem was observed on WIN32. +2012-03-05 Fabrice Fontaine + + SF Bug Tracker id 3497140 - Bug fix in http_get_code_text + + Submitted: Fabrice Fontaine ( ffontaine ) - 2012-03-05 13:07:03 PST + + Replace if( statusCode < 100 && statusCode >= 600 ) which can't be true + by if( statusCode < 100 || statusCode >= 600 ). + 2012-03-05 Fabrice Fontaine SF Bug Tracker id 3497126 - Resource leak in http_RecvPostMessage diff --git a/upnp/src/genlib/net/http/statcodes.c b/upnp/src/genlib/net/http/statcodes.c index 67ae4c4..31b9ff3 100644 --- a/upnp/src/genlib/net/http/statcodes.c +++ b/upnp/src/genlib/net/http/statcodes.c @@ -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: @@ -179,7 +180,7 @@ http_get_code_text( int statusCode ) init_tables(); } - if( statusCode < 100 && statusCode >= 600 ) { + if( statusCode < 100 || statusCode >= 600 ) { return NULL; }