comparison libpurple/protocols/jabber/si.c @ 31770:40eb10487f87

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.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 10 Mar 2011 06:01:39 +0000
parents a8cc50c2279f
children 7281d151e492 0123005d0fb8
comparison
equal deleted inserted replaced
31769:eeca86db288b 31770:40eb10487f87
1697 1697
1698 if(!(filename = xmlnode_get_attrib(file, "name"))) 1698 if(!(filename = xmlnode_get_attrib(file, "name")))
1699 return; 1699 return;
1700 1700
1701 if((filesize_c = xmlnode_get_attrib(file, "size"))) 1701 if((filesize_c = xmlnode_get_attrib(file, "size")))
1702 filesize = atoi(filesize_c); 1702 filesize = strtoul(filesize_c, NULL, 10);
1703 1703
1704 if(!(feature = xmlnode_get_child(si, "feature"))) 1704 if(!(feature = xmlnode_get_child(si, "feature")))
1705 return; 1705 return;
1706 1706
1707 if(!(x = xmlnode_get_child_with_namespace(feature, "x", "jabber:x:data"))) 1707 if(!(x = xmlnode_get_child_with_namespace(feature, "x", "jabber:x:data")))