53e6084bfe
from Martynas Venckus <martynas at altroot dot org>
20 lines
735 B
Plaintext
20 lines
735 B
Plaintext
$OpenBSD: patch-protocols_msn_msn_util_c,v 1.3 2007/01/14 21:53:01 simon Exp $
|
|
--- protocols/msn/msn_util.c.orig Sat Jun 24 17:00:44 2006
|
|
+++ protocols/msn/msn_util.c Fri Dec 15 21:20:07 2006
|
|
@@ -66,9 +66,12 @@ int msn_buddy_list_add( struct gaim_conn
|
|
if( g_strcasecmp( l->data, who ) == 0 )
|
|
return( 1 );
|
|
|
|
- realname = g_new0( char, strlen( realname_ ) * 3 + 1 );
|
|
- strcpy( realname, realname_ );
|
|
- http_encode( realname );
|
|
+ {
|
|
+ size_t len = strlen( realname_ ) * 3 + 1;
|
|
+ realname = g_new0( char, len );
|
|
+ strlcpy( realname, realname_, len );
|
|
+ http_encode( realname, len );
|
|
+ }
|
|
|
|
g_snprintf( buf, sizeof( buf ), "ADD %d %s %s %s\r\n", ++md->trId, list, who, realname );
|
|
if( msn_write( gc, buf, strlen( buf ) ) )
|