pidgin: 39569a4a: I believe this fixes Coverity 383:

markdoliner at pidgin.im markdoliner at pidgin.im
Mon Mar 3 03:40:48 EST 2008


-----------------------------------------------------------------
Revision: 39569a4ae99b28356203c9a6abd55e0f6720240e
Ancestor: 5cfe7a2e2851bc0bc8febade1ec977727136d8e5
Author: markdoliner at pidgin.im
Date: 2008-03-03T08:36:35
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/39569a4ae99b28356203c9a6abd55e0f6720240e

Modified files:
        libpurple/protocols/oscar/oscar.c

ChangeLog: 

I believe this fixes Coverity 383:
Possible overrun of static array "buf"

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	b94b8eaa61c17b7e1f4227072cd81239aea86e20
+++ libpurple/protocols/oscar/oscar.c	b01642164ef1d80db5264f72848e814d61ac8f6e
@@ -6622,7 +6622,7 @@ oscar_normalize(const PurpleAccount *acc
 	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++;


More information about the Commits mailing list