summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Atallah <datallah@pidgin.im>2009-04-30 01:57:32 +0000
committerDaniel Atallah <datallah@pidgin.im>2009-04-30 01:57:32 +0000
commitd592e41e4f21f6222adad68b255fb99eae08526f (patch)
treea1f4d9b1fffba67ccc48597f3140f121e0603676
parent180d3f51f196f391c2cc04b6af76262fe788f691 (diff)
downloadpidgin-d592e41e4f21f6222adad68b255fb99eae08526f.tar.gz
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.
-rw-r--r--libpurple/protocols/msn/soap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpurple/protocols/msn/soap.c b/libpurple/protocols/msn/soap.c
index b986562272..702ebfe17c 100644
--- a/libpurple/protocols/msn/soap.c
+++ b/libpurple/protocols/msn/soap.c
@@ -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;