# HG changeset patch # User Daniel Atallah # Date 1241056652 0 # Node ID 62e619e4957e84347b6bd1dcd0173cb99442587c # Parent 96814f0cfe49698c1847d1e218504824b8963d55 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. diff -r 96814f0cfe49 -r 62e619e4957e libpurple/protocols/msn/soap.c --- a/libpurple/protocols/msn/soap.c Mon Mar 02 02:29:53 2009 +0000 +++ b/libpurple/protocols/msn/soap.c Thu Apr 30 01:57:32 2009 +0000 @@ -434,7 +434,7 @@ 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;