< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] Parse error in NameAddr


Hi,
If HANDLE_EMBEDDED_QUOTES_DNAME is defined, we get an exception if
display-name has trailing whitespace. Here is a patch for that:

 *** NameAddr.cxx.orig   2014-08-18 16:17:33.290738559 +0200
--- NameAddr.cxx        2014-08-18 16:18:24.038738709 +0200
*************** NameAddr::mustQuoteDisplayName() const
*** 381,392 ****
--- 381,396 ----
     else
     {
        while (!pb.eof())
        {
           const char* start;
           start = pb.skipWhitespace();
+          if (pb.eof())
+          {
+             return false;
+          }
           pb.skipNonWhitespace();
                 const char* end = pb.position();
           for (const char* c = start; c < end; c++)
           {
              if ( (*c >= 'a' && *c <= 'z') ||
                   (*c >= 'A' && *c <= 'Z') ||


Best Regards,
Björn Andersson