bug-mailutils
[Top][All Lists]
Advanced

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

Re: [bug-mailutils] imap[s] seg fault in mail[x]


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] imap[s] seg fault in mail[x]
Date: Fri, 20 Feb 2009 10:06:12 +0200

Paul Vojta <address@hidden> ha escrit:

> However, on further thought, it seems that all occurrences of sp in that
> long if statement should really be sp1 -- otherwise they refer to text
> after the ']', which doesn't make sense (keep in mind that my knowledge
> of the IMAP protocol is next to nil).

No, the rest of the occurences are right. They are intended to point
past the closing bracket, where, according to the protocol, a
human-readable description of the problem is printed. For example, the ALERT
response code is defined by RFC 2060 as:

     ALERT          The human-readable text contains a special alert
                    that MUST be presented to the user in a
                    fashion hat calls the user's attention to the message.

Here's an example of a server returning that code:

* OK [ALERT] System shutdown in 10 minutes

When parsing this reply, imap_parse will produce a warning "System
shutdown in 10 minutes", which is exactly what RFC requires.
    
> Also, I'm a bit uncomfortable with the direct use of the value of sp/sp1.
> The value is not documented (at least not in the man page), and in
> principle an implementation could store the end of the previous string
> there instead of the first character after it.

Yes, I agree with that. I plan a rewrite of the IMAP client part, which
should also fix this. Stay in touch for updates:)

Regards,
Sergey




reply via email to

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