Coverity CID 468130

g_bitmask_to_str() can return < 0 on error. This is not adequately
catered for.
This commit is contained in:
matt335672
2025-04-17 14:52:49 +01:00
parent 417076b215
commit ffe9ac9122
+1 -1
View File
@@ -68,7 +68,7 @@ protocol_mask_to_str(int protocol, char *buff, int bufflen)
/* String is empty */
rlen = g_snprintf(buff, bufflen, "RDP");
}
else if (rlen < bufflen)
else if (rlen > 0 && rlen < bufflen)
{
rlen += g_snprintf(buff + rlen, bufflen - rlen, "%cRDP", delim);
}