changeset 25840:62e619e4957e

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.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 30 Apr 2009 01:57:32 +0000
parents 96814f0cfe49
children 0d7f02640e2b
files libpurple/protocols/msn/soap.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;