[gmime: 12/24] Fix out-of-bounds read in decode_domain_literal()
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime: 12/24] Fix out-of-bounds read in decode_domain_literal()
- Date: Sat, 26 Aug 2017 13:20:45 +0000 (UTC)
commit 02bd5f7d8a290878c4ff0b8aaef4bee81f34a306
Author: Jakub Wilk <jwilk jwilk net>
Date: Sun Jul 30 23:21:41 2017 +0200
Fix out-of-bounds read in decode_domain_literal()
If a malformed address ended right after dtext, the original code would
jump over the terminating null byte.
gmime/gmime-parse-utils.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gmime/gmime-parse-utils.c b/gmime/gmime-parse-utils.c
index 4ade524..7c506cb 100644
--- a/gmime/gmime-parse-utils.c
+++ b/gmime/gmime-parse-utils.c
@@ -380,7 +380,8 @@ decode_domain_literal (const char **in, GString *domain)
*inptr, *in));
/* try and skip to the next char ?? */
- inptr++;
+ if (*inptr)
+ inptr++;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]