talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 16b5db8d3a4073b18193e0ed82f73d74c57b0fb2
parent 37b65a4db70b26267deb1842081f7b64df15de55
Author: wwp <wwp@free.fr>
Date:   Tue, 10 Jan 2017 09:59:52 +0100

Fix Coverity CIDs: 1220274 and 1220377.

Diffstat:
Msrc/plugins/python/clawsmailmodule.c | 3++-
Msrc/plugins/python/python-shell.c | 2+-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 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 @@ -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])))