[gmime: 3/6] Fix off-by-one out-of-bounds read in g_mime_charset_canon_name()
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime: 3/6] Fix off-by-one out-of-bounds read in g_mime_charset_canon_name()
- Date: Fri, 20 Oct 2017 15:04:25 +0000 (UTC)
commit e3643db0c587b6ac5fa4c3bdb01d766f7d6af9eb
Author: Jakub Wilk <jwilk jwilk net>
Date: Sat Oct 7 20:40:14 2017 +0200
Fix off-by-one out-of-bounds read in g_mime_charset_canon_name()
gmime/gmime-charset.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gmime/gmime-charset.c b/gmime/gmime-charset.c
index dac7090..7343dcc 100644
--- a/gmime/gmime-charset.c
+++ b/gmime/gmime-charset.c
@@ -587,7 +587,7 @@ g_mime_charset_canon_name (const char *charset)
if (endptr == ptr || *endptr != '\0')
return charset;
- if (iso > G_N_ELEMENTS (iso_charsets))
+ if (iso >= G_N_ELEMENTS (iso_charsets))
return charset;
return iso_charsets[iso];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]