Skip to content

Commit 5ac27c0

Browse files
committed
oxcmail: check return value of get_content_param calls
CID 1563314: (#1 of 1): Unchecked return value (CHECKED_RETURN) 40. check_return: Calling oxcmail_get_content_param without checking return value (as is done elsewhere 5 out of 6 times).
1 parent 9f6894a commit 5ac27c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mapi/oxcmail.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,8 @@ static void oxcmail_enum_attachment(const MIME *pmime, void *pparam)
16861686
oxcmail_get_content_param(pmime, "site", site_buff) &&
16871687
oxcmail_get_content_param(pmime, "directory", dir_buff)) {
16881688
std::string mode_buff;
1689-
oxcmail_get_content_param(pmime, "mode", mode_buff);
1689+
if (oxcmail_get_content_param(pmime, "mode", mode_buff))
1690+
/* mode_buff.clear() - already empty */;
16901691
if (strcasecmp(mode_buff.c_str(), "ascii") == 0)
16911692
mode_buff = ";type=a";
16921693
else if (strcasecmp(mode_buff.c_str(), "image") == 0)

0 commit comments

Comments
 (0)