pidgin: 63e9e38a: Use strtoul instead of atoi for the size...

qulogic at pidgin.im qulogic at pidgin.im
Thu Mar 10 01:31:13 EST 2011


----------------------------------------------------------------------
Revision: 63e9e38a8f31aacc71a9acc074933e484bbfc43e
Parent:   c66c5a64494057c9393b87475339e260c5b5658f
Author:   qulogic at pidgin.im
Date:     03/10/11 01:01:39
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/63e9e38a8f31aacc71a9acc074933e484bbfc43e

Changelog: 

Use strtoul instead of atoi for the size of an SI transfer, which
doesn't produce negative numbers. However, since size_t is platform
dependent, this probably only fixes things on 64-bit systems until
3.0.0 when we can fix the PurpleXfer structure.

Refs #13458.

Changes against parent c66c5a64494057c9393b87475339e260c5b5658f

  patched  libpurple/protocols/jabber/si.c

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/si.c	c10dc71bba886325a006980438c437350d1035d1
+++ libpurple/protocols/jabber/si.c	fd880f6a5e099c93e420bfcca42b36da7e2eec1d
@@ -1699,7 +1699,7 @@ void jabber_si_parse(JabberStream *js, c
 		return;
 
 	if((filesize_c = xmlnode_get_attrib(file, "size")))
-		filesize = atoi(filesize_c);
+		filesize = strtoul(filesize_c, NULL, 10);
 
 	if(!(feature = xmlnode_get_child(si, "feature")))
 		return;


More information about the Commits mailing list