Two memory leaks and a possibly not terminated string.
(There also is a false positive in sbr/path.c.)
(sbr/dtimep.c has warnings, but I believe lex is correct. ;-) )
if (stat(name, &st) == -1) {
free(name);
+ closedir(dd);
return NULL;
}
*/
break;
}
+ free(maildir_copy);
if (incerr < 0) { /* error */
if (locked) {
i = strlen("From ");
strncpy(buffer, envelope + i, sizeof(buffer));
+ buffer[sizeof buffer -1] = '\0'; /* ensure termination */
if ((cp = strchr(buffer, '\n'))) {
*cp = '\0';
cp -= 24;