From: Yogesh Kumar Shukla Date: Tue, 24 Sep 2024 12:15:50 +0000 (+0530) Subject: Changes Regarding heap-buffer-overflow X-Git-Tag: accepted/tizen/9.0/unified/20241030.231533^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;p=platform%2Fcore%2Fmessaging%2Femail-service.git Changes Regarding heap-buffer-overflow Change-Id: Ic029d48c99cf159c87eab158cca41b11e2844b78 --- diff --git a/email-core/email-core-smtp.c b/email-core/email-core-smtp.c index 2e1f174..5ae11cf 100755 --- a/email-core/email-core-smtp.c +++ b/email-core/email-core-smtp.c @@ -2268,7 +2268,7 @@ INTERNAL_FUNC int emcore_send_saved_mail(char *multi_user_name, int account_id, goto FINISH_OFF; } - mail_ids = em_malloc(sizeof(int) * total); + mail_ids = em_malloc(sizeof(int) * (total+1)); if (mail_ids == NULL) { EM_DEBUG_EXCEPTION("malloc failed..."); err = EMAIL_ERROR_OUT_OF_MEMORY;