pidgin: 371a95b7: Fix truncation of a string in the Yahoo!...

elb at pidgin.im elb at pidgin.im
Thu Aug 11 12:42:10 EDT 2011


----------------------------------------------------------------------
Revision: 371a95b7eb479120ff74046d90064703f4e2271a
Parent:   030c5da3eb3dfd477b70c509cbe0ec0337c9aaa0
Author:   elb at pidgin.im
Date:     08/11/11 12:30:51
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/371a95b7eb479120ff74046d90064703f4e2271a

Changelog: 

Fix truncation of a string in the Yahoo! prpl to be not quite so stupid.

Changes against parent 030c5da3eb3dfd477b70c509cbe0ec0337c9aaa0

  patched  libpurple/protocols/yahoo/yahoo_filexfer.c

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo_filexfer.c	de2505d7984848ba18c5783eec488894f9190d2c
+++ libpurple/protocols/yahoo/yahoo_filexfer.c	2741fc87c0c9e738c5ff23283f88523f06bc4c05
@@ -1428,7 +1428,7 @@ static void yahoo_p2p_ft_HEAD_GET_cb(gpo
 
 	unix_time = time(NULL);
 	time_str = ctime(&unix_time);
-	strcpy(time_str + strlen(time_str) - 1, "\0");
+	time_str[strlen(time_str) - 1] = '\0';
 
 	if (xd->txbuflen == 0)	{
 		xd->txbuf = g_strdup_printf("HTTP/1.0 200 OK\r\n"


More information about the Commits mailing list