gcc 11 and strlen
Fedora 34 uses GCC version 11.0.0, and it introduces a new error (most likely, among others!):
../balsa/libbalsa/imap/imap-handle.c: In function ‘imap_message_deserialize’: ../balsa/libbalsa/imap/imap-handle.c:1726:10: error: ‘strlen’ reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread] 1726 | ptr += strlen(ptr) + 1; | ^~~~~~~~~~~ ../balsa/libbalsa/imap/imap-handle.c:1661:9: note: at offset 1 into source object ‘fetched_headers_first_char’ of size 1 1661 | gchar fetched_headers_first_char; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ninja: build stopped: subcommand failed.
fetched_headers_first_char is a single
char at the tail of
struct ImapMsgSerialized, and is used to access data allocated after the
struct ImapMsgSerialized *imes = (struct ImapMsgSerialized*)data; … ptr = &imes->fetched_headers_first_char;
Storing data at
ptr and beyond using
strcpy() raises no error, but perhaps will in future versions.