[gmime] fixed buffer overrun in decoding 8bit headers
- From: Jeffrey Stedfast <fejj src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gmime] fixed buffer overrun in decoding 8bit headers
- Date: Tue, 12 Jan 2010 16:15:16 +0000 (UTC)
commit 90cd9e2b7a034c16318d116aa85575c50aee3830
Author: Jeffrey Stedfast <fejj gnome org>
Date: Tue Jan 12 11:10:31 2010 -0500
fixed buffer overrun in decoding 8bit headers
2010-01-12 Jeffrey Stedfast <fejj novell com>
* gmime/gmime-utils.c (g_mime_utils_decode_8bit): Make sure to
always increment inptr as we force-convert it to ascii. Thanks to
Damian Pietras for finding this bug.
ChangeLog | 6 ++++++
gmime/gmime-utils.c | 4 +++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 082c0b6..f095852 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-12 Jeffrey Stedfast <fejj novell com>
+
+ * gmime/gmime-utils.c (g_mime_utils_decode_8bit): Make sure to
+ always increment inptr as we force-convert it to ascii. Thanks to
+ Damian Pietras for finding this bug.
+
2009-12-15 Jeffrey Stedfast <fejj novell com>
* Released 2.5.0 - it's time to get this out there for people to
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index 0eb03cc..90c5cda 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -1666,9 +1666,11 @@ g_mime_utils_decode_8bit (const char *text, size_t len)
while (inptr < inend) {
if (is_ascii (*inptr))
- *outbuf++ = *inptr++;
+ *outbuf++ = *inptr;
else
*outbuf++ = '?';
+
+ inptr++;
}
*outbuf++ = '\0';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]