python plugin: silence -Wconversion warnings.

This commit is contained in:
Todd C. Miller
2023-07-07 15:07:04 -06:00
parent a38b714667
commit 0c85f10c80
5 changed files with 9 additions and 7 deletions

View File

@@ -137,7 +137,7 @@ sudo_module_ConvMessages_to_c(PyObject *py_tuple, Py_ssize_t *num_msgs, struct s
debug_return_int(SUDO_RC_ERROR);
}
*msgs = calloc(*num_msgs, sizeof(struct sudo_conv_message));
*msgs = calloc((size_t)*num_msgs, sizeof(struct sudo_conv_message));
if (*msgs == NULL) {
debug_return_int(SUDO_RC_ERROR);
}