/pidgin/main: 062af32ae5b7: It is safer to use g_snprintf() for ...

Andrew Victor andrew.victor at mxit.com
Thu Mar 7 04:56:20 EST 2013


Changeset: 062af32ae5b700b14e0177a58846e8732afde531
Author:	 Andrew Victor <andrew.victor at mxit.com>
Date:	 2013-03-07 11:25 +0200
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/062af32ae5b7

Description:

It is safer to use g_snprintf() for text strings.

diffstat:

 libpurple/protocols/mxit/protocol.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff --git a/libpurple/protocols/mxit/protocol.c b/libpurple/protocols/mxit/protocol.c
--- a/libpurple/protocols/mxit/protocol.c
+++ b/libpurple/protocols/mxit/protocol.c
@@ -2450,12 +2450,12 @@ static int process_error_response( struc
 					return 0;
 				}
 				else {
-					snprintf( errmsg, sizeof( errmsg ), _( "Login error: %s (%i)" ), errdesc, packet->errcode );
+					g_snprintf( errmsg, sizeof( errmsg ), _( "Login error: %s (%i)" ), errdesc, packet->errcode );
 					purple_connection_error( session->con, errmsg );
 					return -1;
 				}
 		case CP_CMD_LOGOUT :
-				snprintf( errmsg, sizeof( errmsg ), _( "Logout error: %s (%i)" ), errdesc, packet->errcode );
+				g_snprintf( errmsg, sizeof( errmsg ), _( "Logout error: %s (%i)" ), errdesc, packet->errcode );
 				purple_connection_error_reason( session->con, PURPLE_CONNECTION_ERROR_NAME_IN_USE, _( errmsg ) );
 				return -1;
 		case CP_CMD_CONTACT :



More information about the Commits mailing list