Pleasing Coverity for the improbable case that a builtin error message
length exceeds 4095 bytes.
This commit is contained in:
parent
3a870d23e3
commit
f3b836194c
@ -569,7 +569,8 @@ int iso_msg_submit(int imgid, int errcode, int causedby, const char *fmt, ...)
|
||||
vsnprintf(msg, MAX_MSG_LEN, fmt, ap);
|
||||
va_end(ap);
|
||||
} else {
|
||||
strncpy(msg, iso_error_to_msg(errcode), MAX_MSG_LEN);
|
||||
strncpy(msg, iso_error_to_msg(errcode), MAX_MSG_LEN - 1);
|
||||
msg[MAX_MSG_LEN - 1] = 0;
|
||||
}
|
||||
|
||||
libiso_msgs_submit(libiso_msgr, imgid, ISO_ERR_CODE(errcode),
|
||||
|
Loading…
Reference in New Issue
Block a user