Crashing message

Xavier Nodet <[email protected]>
Newsgroups gmane.mail.mahogany.devel
Message-ID <[email protected]>
Hi all,

the attached message triggers a crash in wxHtmlTagsCache::QueryTag.  I
changed this method as the attached patch against WX_2_6_1 shows (I took
the simplest route, and did not change the API).

Note that the message has a web-bug in it.

Have a good day...

--
Xavier Nodet
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin, 1759.
(unnamed) (message/rfc822, 2.8 KB) - not displayed
QueryTag.patch (text/plain, 844 B)
cvs -z3 diff -u -wb -- src\html\htmltag.cpp (in directory U:\src\wxWindows\)
Index: src/html/htmltag.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/html/htmltag.cpp,v
retrieving revision 1.47
diff -u -w -b -r1.47 htmltag.cpp
--- src/html/htmltag.cpp	2005/05/31 09:20:13	1.47
+++ src/html/htmltag.cpp	2005/06/21 07:39:37
@@ -196,10 +196,15 @@
         {
             m_CachePos += delta;
         }
-        while (m_Cache[m_CachePos].Key != at);
+        while ((m_CachePos < m_CacheSize) && (m_CachePos >= 0) && (m_Cache[m_CachePos].Key != at));
     }
+    if ((m_CachePos >= m_CacheSize) || (m_CachePos < 0)) {
+      *end1 = 2000000000;
+      *end2 = 2000000000;
+    } else {
     *end1 = m_Cache[m_CachePos].End1;
     *end2 = m_Cache[m_CachePos].End2;
+    }
 }
signature.asc (application/pgp-signature, 205 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32) - GPGrelay v0.955

iD8DBQBCt8rGFK6OUIeqvjQRAmcuAJ4g9KadlpjsAJI7kVbTd8y65WLABgCfaSju
ceXAYmmwa/2OdoilYLwyt3c=
=Rpsa
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.