gnash-dev
[Top][All Lists]
Advanced

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

[Gnash-dev] Improve URL parsing using a sane comparison. (patch)


From: annonygmouse
Subject: [Gnash-dev] Improve URL parsing using a sane comparison. (patch)
Date: Sun, 16 Jul 2006 09:53:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; ca-AD; rv:1.7.13) Gecko/20060621 Debian/1.7.13-0.2


I've found lots of URLs that the plugin didn't know how to parse "Can't parse URL".

The problem is a unsane comparison.
I attach a patch that works for me.

SebastiĆ 
Index: plugin/plugin.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/plugin.cpp,v
retrieving revision 1.33
diff -u -r1.33 plugin.cpp
--- plugin/plugin.cpp   15 Jul 2006 16:02:23 -0000      1.33
+++ plugin/plugin.cpp   16 Jul 2006 07:50:53 -0000
@@ -554,7 +554,7 @@
            start++;
        }
        end = opts.find("&", start);
-       if (end <= 0) {
+       if ((int) end <= 0) {
            end = opts.size();
        }
        if (eq == string::npos) {
@@ -563,7 +563,7 @@
        // Some URLs we can't parse for odd reasons, so this prevents
        // Firefox from crashing in those cases.
        if (end == string::npos) {
-           dbglogfile << "ERROR: Can't parse URL!" << endl;
+           dbglogfile << "ERROR: Can't parse URL! opts=\"" << opts << "\"" << 
endl;
            return NPERR_INVALID_PARAM;
        } else {
            name = opts.substr(start, eq);

reply via email to

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