From: wwp Date: Tue, 10 Jan 2017 08:59:52 +0000 (+0100) Subject: Fix Coverity CIDs: 1220274 and 1220377. X-Git-Tag: 3.15.0~138 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=16b5db8d3a4073b18193e0ed82f73d74c57b0fb2 Fix Coverity CIDs: 1220274 and 1220377. --- diff --git a/src/plugins/python/clawsmailmodule.c b/src/plugins/python/clawsmailmodule.c index 5ce3b9573..aa472e03b 100644 --- a/src/plugins/python/clawsmailmodule.c +++ b/src/plugins/python/clawsmailmodule.c @@ -920,7 +920,8 @@ PyMODINIT_FUNC initclawsmail(void) /* add module member "compose_window" set to None */ Py_INCREF(Py_None); - PyModule_AddObject(cm_module, "compose_window", Py_None); + if (PyModule_AddObject(cm_module, "compose_window", Py_None) == -1) + debug_print("Error: Could not add object 'compose_window'\n"); /* initialize classes */ ok = ok && cmpy_add_node(cm_module); diff --git a/src/plugins/python/python-shell.c b/src/plugins/python/python-shell.c index 6d2f06d07..4ecd3c927 100644 --- a/src/plugins/python/python-shell.c +++ b/src/plugins/python/python-shell.c @@ -210,7 +210,7 @@ parasite_python_shell_process_line(GtkWidget *python_shell) g_free(g_queue_pop_tail(priv->history)); } - last_char = command[MAX(0, strlen(command) - 1)]; + last_char = command[MAX(0, (gint)(strlen(command) - 1))]; if (last_char == ':' || last_char == '\\' || (priv->in_block && g_ascii_isspace(command[0])))