AmendHub

Download (as of this amendment):

jcs

/

subtext

/

amendments

/

616

mail: Check bile_unmarshall_object return


jcs made amendment 616 11 months ago
--- mail.c Tue Jan 23 16:27:19 2024 +++ mail.c Sun Dec 7 11:57:13 2025 @@ -529,8 +529,10 @@ mail_list(struct session *s, size_t nmail_ids, unsigne mail_ids[n], &data); if (size == 0) break; - bile_unmarshall_object(db->mail_bile, mail_object_fields, - nitems(mail_object_fields), data, size, &msg, sizeof(msg), true); + if (bile_unmarshall_object(db->mail_bile, mail_object_fields, + nitems(mail_object_fields), data, size, &msg, sizeof(msg), + true) != 0) + return; xfree(&data); if (msg.ftn_from[0] && msg.recipient_user_id) {