pidgin.2.5.5.veracode: 4a9808cf: Use sscanf to parse to parse the Content...
datallah at pidgin.im
datallah at pidgin.im
Thu May 14 17:36:30 EDT 2009
-----------------------------------------------------------------
Revision: 4a9808cf606d6fd5115791eafb090312a3c02242
Ancestor: f29c90f0da72e27c601fd8c4e1aff2a250a52473
Author: datallah at pidgin.im
Date: 2009-04-30T01:57:32
Branch: im.pidgin.pidgin.2.5.5.veracode
URL: http://d.pidgin.im/viewmtn/revision/info/4a9808cf606d6fd5115791eafb090312a3c02242
Modified files:
libpurple/protocols/msn/soap.c
ChangeLog:
Use sscanf to parse to parse the Content-Length to ensure consistent parsing for the target variable type. This comes out of the Veracode analysis.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/soap.c a6c9a90fd13661ea0885013a22674f89da8657db
+++ libpurple/protocols/msn/soap.c ffaf4079d76e316bd2dfb4e0282448c013e5e4e1
@@ -434,7 +434,7 @@ msn_soap_process(MsnSoapConnection *conn
g_free(line);
return;
} else if (strcmp(key, "Content-Length") == 0) {
- conn->body_len = atoi(value);
+ sscanf(value, "%" G_GSIZE_FORMAT, &(conn->body_len));
} else if (strcmp(key, "Connection") == 0) {
if (strcmp(value, "close") == 0) {
conn->close_when_done = TRUE;
More information about the Commits
mailing list