fix Debian bug #202667: crash when a message's filename overflows an int
authorOliver Kiddle <okiddle@yahoo.co.uk>
Wed, 23 Feb 2005 14:07:52 +0000 (14:07 +0000)
committerOliver Kiddle <okiddle@yahoo.co.uk>
Wed, 23 Feb 2005 14:07:52 +0000 (14:07 +0000)
when converted

ChangeLog
sbr/folder_read.c

index a42dd83..9a6c974 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-02-23  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
 2005-02-23  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
+       * sbr/folder_read.c fix Debian bug #202667: crash when a
+       message's filename overflows an int when converted
+
        * Updated config.guess and config.sub to the most recent
        versions (from automake 1.9.5)
 
        * Updated config.guess and config.sub to the most recent
        versions (from automake 1.9.5)
 
index b5b3f9d..2e67917 100644 (file)
@@ -70,7 +70,7 @@ folder_read (char *name)
        adios (NULL, "unable to allocate storage");
 
     while ((dp = readdir (dd))) {
        adios (NULL, "unable to allocate storage");
 
     while ((dp = readdir (dd))) {
-       if ((msgnum = m_atoi (dp->d_name))) {
+       if ((msgnum = m_atoi (dp->d_name)) && msgnum > 0) {
            /*
             * Check if we need to allocate more
             * temporary elements for message names.
            /*
             * Check if we need to allocate more
             * temporary elements for message names.