# HG changeset patch # User Daniel Atallah # Date 1241292071 0 # Node ID fbcb4088d92358961f7c7186c7bb9001ced91b25 # Parent 0d7f02640e2bd27aeec1b0eefed8120d2181f47b Make sure that the chat room name is NUL-terminated when it is truncated or exactly 128 chars. This came out of the veracode analysis. diff -r 0d7f02640e2b -r fbcb4088d923 libpurple/protocols/oscar/family_oservice.c --- a/libpurple/protocols/oscar/family_oservice.c Sat May 02 17:43:14 2009 +0000 +++ b/libpurple/protocols/oscar/family_oservice.c Sat May 02 19:21:11 2009 +0000 @@ -151,7 +151,8 @@ memset(&csi, 0, sizeof(csi)); csi.exchange = exchange; - strncpy(csi.name, roomname, sizeof(csi.name)); + strncpy(csi.name, roomname, sizeof(csi.name) - 1); + csi.name[sizeof(csi.name) - 1] = '\0'; csi.instance = instance; /*