On Fri, Dec 12, 2008 at 06:24:12PM +0100, strk wrote:
> I'm getting a failure in testsuite/libnet.all/test_http
> from the rtmp branch. But the result is unsable to I checked
> with valgrind and found a few conditional jumps based
> on uninitialized values, right before the failing test.
It turns out it was missing initialization of the _version
member of HTTP class. It is a structure, I suggest equipping
it with a default constructor to avoid this in the future.
The attached patch tries to be as unobtrusive as possible
by explicitly initializing the struct members in the HTTP
constructors (2 of them). Gives consistent successes
with test_http.
Initializing in the http_version_t struct ctor itself would be
more robust.
--strk;
=== modified file 'libnet/http.cpp'
--- libnet/http.cpp 2008-12-01 15:44:54 +0000
+++ libnet/http.cpp 2008-12-12 17:29:59 +0000
@@ -94,6 +94,8 @@
// GNASH_REPORT_FUNCTION;
// struct status_codes *status = new struct status_codes;
+ _version.major=1;
+ _version.minor=0;
// _status_codes(CONTINUE, status);
}
@@ -107,6 +109,9 @@
{
// GNASH_REPORT_FUNCTION;
_handler = hand;
+
+ _version.major=1;
+ _version.minor=0;
}
HTTP::~HTTP()
_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev