Skip to content
  • Kevin J. McCarthy's avatar
    Fix improper signed int conversion of IMAP uid and msn values. · b8190ef3
    Kevin J. McCarthy authored
    Several places in the imap code, when parsing "number" and "nz-number"
    values from the IMAP data, use atoi() and strtol().  This is
    incorrect, and can result in failures when a uid value happens to be
    larger than 2^31.
    
    Create a helper function, mutt_atoui() and use that instead.  One
    place was using strtol() and relying on the endptr parameter, and so
    was changed to use strtoul() instead.
    
    Thanks to Paul Saunders for the bug report and original patch, which
    this commit is based on.
    b8190ef3