You are not logged in.

#1 2023-03-23 18:46:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,492
Website

[SOLVED upstream] neomutt ver 20230322-2: runtime error on maildir

With the recent update of neomutt to version 20230322-2 I'm seeing the following error sent to stderr on both of my systems:

maildir/maildir.c:569:3: runtime error: null pointer passed as argument 1, which is declared to never be null

I confirmed downgrading neomutt ot the previous version prevented the error and re-upgrading restored the error again.

This happens with any maildir folder in which the /new subdirectory is empty (maildirs by definition contain /cur /new and /tmp directories).  I have not tested whether an empty /cur directory would also result in an error, but an empty /tmp does not trigger it.

I checked the neomutt source code at that line; here is the offending line and the macro definition from the array.h header:

/* from array.h */
#define ARRAY_SORT(head, fn)
   qsort((head)->entries, ARRAY_SIZE(head), ARRAY_ELEM_SIZE(head), (fn))

/* The error causing line: maildir.c +569 */
ARRAY_SORT(mda, maildir_cmp_inode);

I gather this means mda->entries is null when that code runs which seems sensible if the directory is empty (mda couldn't be null as that would result in a seg-fault).  I compared the function that this line occurs in with the source code for the same function in the previous version, and despite a few changes in variable names, I don't see any change in this function that could result in a difference.  So I gather the mda value that's passed to this function has changed (and therefore likely didn't have a null "entries" member even when the dir was empty in previous versions).

Can anyone else using neomutt with a maildir confirm or fail to confirm this issue (with an empty "new" subdir)?


EDIT: I checked upstream last night and there was nothing, but apparently this issues was raised there since then and there is already a fix in git.  Perhaps that fix could be backported or we could just our repo package rebuilt with the current git source.

Last edited by Trilby (2023-03-23 20:09:05)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB