Mercurial > pidgin.yaz
changeset 22395:4294c07cc06c
I believe this fixes Coverity 383:
Possible overrun of static array "buf"
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 03 Mar 2008 08:36:35 +0000 |
parents | 3e2fe115c330 |
children | 1d3783f659c2 |
files | libpurple/protocols/oscar/oscar.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c Mon Mar 03 08:26:44 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.c Mon Mar 03 08:36:35 2008 +0000 @@ -6622,7 +6622,7 @@ g_return_val_if_fail(str != NULL, NULL); /* copy str to buf and skip all blanks */ - for (i=0, j=0; str[j] && i < BUF_LEN; i++, j++) + for (i=0, j=0; str[j] && i < BUF_LEN - 1; i++, j++) { while (str[j] == ' ') j++;