pan-devel
[Top][All Lists]
Advanced

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

Re: [Pan-devel] GNKSA::get_short_author_name corruption


From: Charles Kerr
Subject: Re: [Pan-devel] GNKSA::get_short_author_name corruption
Date: Mon, 10 Apr 2006 21:20:07 -0500 (CDT)
User-agent: SquirrelMail/1.4.6 [CVS]

> Noticed a crash today when opening a specific group. Turns out someone
> used the following name:
>
>       "@nermos" <anermosathotmaildotcom@>
>
> When GNKSA::get_short_author_name() parses this, it gave the following
> corrupt StringView:
>
>       {str = 0x8051641 "@nermos\" <anermosathotmaildotcom@>", len =
>       4294967295}

Well spotted, and well narrowed-down.  Here's the patch:

--- /tmp/pan-0.92/pan/usenet-utils/gnksa.cc     2006-03-24
13:09:46.000000000 -0600
+++ ./gnksa.cc  2006-04-10 21:19:17.000000000 -0500
@@ -650,7 +650,7 @@
     s = author;

   s.trim ();
-  if (!s.empty() && s.front()=='"' && s.back()=='"')
+  if (s.len>2 && s.front()=='"' && s.back()=='"')
     s = s.substr(s.begin()+1, s.end()-1);

   return s;

cheers,
Charles





reply via email to

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