From ffe04247cc1018d069214bf603dd7bc31161262c Mon Sep 17 00:00:00 2001 From: Hidetoshi Tajima Date: Tue, 20 Aug 2002 23:03:17 +0000 Subject: [PATCH] validate 'len' argument properly for the case that input string is not * glib/gconvert.c (strdup_len): validate 'len' argument properly for the case that input string is not null-terminated. (#91222) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ glib/gconvert.c | 2 +- 8 files changed, 36 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fcc7e32..646aeaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Aug 20 16:01:03 2002 HideToshi Tajima + + * glib/gconvert.c (strdup_len): validate 'len' argument properly + for the case that input string is not null-terminated. (#91222) + 2002-08-10 Gustavo Noronha Silva * configure.in: added pt_BR to ALL_LINGUAS diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index fcc7e32..646aeaa 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Tue Aug 20 16:01:03 2002 HideToshi Tajima + + * glib/gconvert.c (strdup_len): validate 'len' argument properly + for the case that input string is not null-terminated. (#91222) + 2002-08-10 Gustavo Noronha Silva * configure.in: added pt_BR to ALL_LINGUAS diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index fcc7e32..646aeaa 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +Tue Aug 20 16:01:03 2002 HideToshi Tajima + + * glib/gconvert.c (strdup_len): validate 'len' argument properly + for the case that input string is not null-terminated. (#91222) + 2002-08-10 Gustavo Noronha Silva * configure.in: added pt_BR to ALL_LINGUAS diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index fcc7e32..646aeaa 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Tue Aug 20 16:01:03 2002 HideToshi Tajima + + * glib/gconvert.c (strdup_len): validate 'len' argument properly + for the case that input string is not null-terminated. (#91222) + 2002-08-10 Gustavo Noronha Silva * configure.in: added pt_BR to ALL_LINGUAS diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index fcc7e32..646aeaa 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Tue Aug 20 16:01:03 2002 HideToshi Tajima + + * glib/gconvert.c (strdup_len): validate 'len' argument properly + for the case that input string is not null-terminated. (#91222) + 2002-08-10 Gustavo Noronha Silva * configure.in: added pt_BR to ALL_LINGUAS diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index fcc7e32..646aeaa 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Tue Aug 20 16:01:03 2002 HideToshi Tajima + + * glib/gconvert.c (strdup_len): validate 'len' argument properly + for the case that input string is not null-terminated. (#91222) + 2002-08-10 Gustavo Noronha Silva * configure.in: added pt_BR to ALL_LINGUAS diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index fcc7e32..646aeaa 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Tue Aug 20 16:01:03 2002 HideToshi Tajima + + * glib/gconvert.c (strdup_len): validate 'len' argument properly + for the case that input string is not null-terminated. (#91222) + 2002-08-10 Gustavo Noronha Silva * configure.in: added pt_BR to ALL_LINGUAS diff --git a/glib/gconvert.c b/glib/gconvert.c index 8371fb5..545f402 100644 --- a/glib/gconvert.c +++ b/glib/gconvert.c @@ -881,7 +881,7 @@ strdup_len (const gchar *string, { gsize real_len; - if (!g_utf8_validate (string, -1, NULL)) + if (!g_utf8_validate (string, len, NULL)) { if (bytes_read) *bytes_read = 0; -- 2.7.4