# HG changeset patch # User Mark Doliner # Date 1204533395 0 # Node ID 4294c07cc06c4b72a2f4abcd2d08045aff918ad3 # Parent 3e2fe115c330661695b33210985eebc8dcbcd9f0 I believe this fixes Coverity 383: Possible overrun of static array "buf" diff -r 3e2fe115c330 -r 4294c07cc06c libpurple/protocols/oscar/oscar.c --- 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++;