gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/rtmp r9899: don't try to format a header w


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/rtmp r9899: don't try to format a header with bogus data.
Date: Thu, 25 Dec 2008 15:27:51 -0700
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9899
committer: address@hidden
branch nick: rtmp
timestamp: Thu 2008-12-25 15:27:51 -0700
message:
  don't try to format a header with bogus data.
modified:
  libnet/http.cpp
=== modified file 'libnet/http.cpp'
--- a/libnet/http.cpp   2008-12-25 00:20:16 +0000
+++ b/libnet/http.cpp   2008-12-25 22:27:51 +0000
@@ -353,11 +353,13 @@
        boost::shared_ptr<amf::Element> &el0 = headers[0];
        boost::shared_ptr<amf::Element> &el1 = headers[1];
        boost::shared_ptr<amf::Element> &el3 = headers[3];
-       if (headers.size() > 0) {
-           amf::Buffer &reply = formatEchoResponse(headers[1]->getName(), 
*headers[3]);
+       if (headers.size() >= 4) {
+           if (headers[3]) {
+               amf::Buffer &reply = formatEchoResponse(headers[1]->getName(), 
*headers[3]);
 //         cerr << "FIXME 3: " << hexify(reply.reference(), reply.allocated(), 
true) << endl;
 //         cerr << "FIXME 3: " << hexify(reply.reference(), reply.allocated(), 
false) << endl;
-           writeNet(fd, reply);
+               writeNet(fd, reply);
+           }
        }
     } else {
        amf::Buffer &reply = formatHeader(_filetype, _filesize, HTTP::OK);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]