Mercurial > pidgin
comparison libpurple/util.c @ 27273:33734bb78c9f
We're about to assume strstr() will find \r\n, so make the sscanf()
ensure it is actually there.
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 04 Jul 2009 00:59:44 +0000 |
parents | c0075538109b |
children | 6aa7772c4cc1 |
comparison
equal
deleted
inserted
replaced
27272:802de68c9fc3 | 27273:33734bb78c9f |
---|---|
3795 char *s = data; | 3795 char *s = data; |
3796 | 3796 |
3797 while (*s) { | 3797 while (*s) { |
3798 /* Read the size of this chunk */ | 3798 /* Read the size of this chunk */ |
3799 if (sscanf(s, "%" G_GSIZE_MODIFIER "x\r\n", &sz) != 1 && | 3799 if (sscanf(s, "%" G_GSIZE_MODIFIER "x\r\n", &sz) != 1 && |
3800 sscanf(s, "%" G_GSIZE_MODIFIER "x;", &sz) != 1) | 3800 sscanf(s, "%" G_GSIZE_MODIFIER "x;\r\n", &sz) != 1) |
3801 { | 3801 { |
3802 purple_debug_error("util", "Error processing chunked data: " | 3802 purple_debug_error("util", "Error processing chunked data: " |
3803 "Expected data length, found: %s\n", s); | 3803 "Expected data length, found: %s\n", s); |
3804 break; | 3804 break; |
3805 } | 3805 } |