<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/2421: mutt does not show number of or indicator for new



The following reply was made to PR mutt/2421; it has been noted by GNATS.

From: Rocco Rutte <pdmef@xxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: mutt/2421: mutt does not show number of or indicator for new
        mails for Maildir mailboxes
Date: Mon, 28 Aug 2006 06:55:59 +0000

 Hi,
 
 * Olaf Hering [06-08-27 16:04:44 +0200] wrote:
 
 >+static unsigned short walk_maildir_new(const char *path)
 
 I didn't look to closely at the patch, but you don't want "unsigned 
 short" but "unsigned int" at least. More than ~65k messages isn't too 
 unlikely after all.
 
 >+  void *md_path;
 [...]
 >+             snprintf (md_path, _POSIX_PATH_MAX, "%s/new", buffer);
 [...]
 >+  if (md_path)
 >+       free (md_path);
 
 Please use something like this:
 
    char md_path[_POSIX_PATH_MAX];
    ...
    snprintf(md_path, sizeof(md_path), ...);
 
 If you really need to use dynamic memory allocation, please run 
 ./check_sec.sh after patching and you'll notice that using free() 
 directly is a bad idea. Please use:
 
    FREE(&md_path);
 
 instead.
 
    bye, Rocco
 -- 
 :wq!