talons

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

commit 2ac9c3f4aefa8fbc6e23c969b1e3a73a5dd482db
parent 7568a95314b5780a5cdced23fa0c9d004c4e5d4f
Author: Colin Leroy <colin@colino.net>
Date:   Tue,  2 Oct 2018 16:21:16 +0200

Fix Coverity #1220388

Diffstat:
Msrc/plugins/notification/notification_core.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/notification/notification_core.c b/src/plugins/notification/notification_core.c @@ -656,22 +656,22 @@ gchar* notification_libnotify_sanitize_str(gchar *in) out = 0; while(*in) { if(*in == '<') { - if(out+4 > STR_MAX_LEN+1) break; + if(out+4 > STR_MAX_LEN) break; memcpy(&(tmp_str[out]),"&lt;",4); in++; out += 4; } else if(*in == '>') { - if(out+4 > STR_MAX_LEN+1) break; + if(out+4 > STR_MAX_LEN) break; memcpy(&(tmp_str[out]),"&gt;",4); in++; out += 4; } else if(*in == '&') { - if(out+5 > STR_MAX_LEN+1) break; + if(out+5 > STR_MAX_LEN) break; memcpy(&(tmp_str[out]),"&amp;",5); in++; out += 5; } else { - if(out+1 > STR_MAX_LEN+1) break; + if(out+1 > STR_MAX_LEN) break; tmp_str[out++] = *in++; } }