From 4d3a5c61bb83fc7d431a3240faa5928feb1cbcf4 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 28 Aug 2006 12:36:38 +0000 Subject: [PATCH] Fix crash on some valid input. --- gettext-tools/src/ChangeLog | 8 ++++++++ gettext-tools/src/x-elisp.c | 2 +- gettext-tools/src/x-librep.c | 2 +- gettext-tools/src/x-scheme.c | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 195b130a9..9c7796927 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,11 @@ +2006-08-28 Bruno Haible + + * x-scheme.c (read_object): Don't call arglist_parser_remember if + argparser is NULL. + * x-elisp.c (read_object): Likewise. + * x-librep.c (read_object): Likewise. + Reported by Kevin Ryde . + 2006-08-16 Bruno Haible * plural-table.c (plural_table): Put Hungarian under nplurals=2. diff --git a/gettext-tools/src/x-elisp.c b/gettext-tools/src/x-elisp.c index df00643fa..43f71805f 100644 --- a/gettext-tools/src/x-elisp.c +++ b/gettext-tools/src/x-elisp.c @@ -709,7 +709,7 @@ read_object (struct object *op, bool first_in_list, bool new_backquote_flag, else { /* These are the argument positions. */ - if (inner.type == t_string) + if (argparser != NULL && inner.type == t_string) arglist_parser_remember (argparser, arg, string_of_object (&inner), inner_context, diff --git a/gettext-tools/src/x-librep.c b/gettext-tools/src/x-librep.c index 6705ced3c..816151658 100644 --- a/gettext-tools/src/x-librep.c +++ b/gettext-tools/src/x-librep.c @@ -683,7 +683,7 @@ read_object (struct object *op, flag_context_ty outer_context) else { /* These are the argument positions. */ - if (inner.type == t_string) + if (argparser != NULL && inner.type == t_string) arglist_parser_remember (argparser, arg, string_of_object (&inner), inner_context, diff --git a/gettext-tools/src/x-scheme.c b/gettext-tools/src/x-scheme.c index 9b33efba0..950463c34 100644 --- a/gettext-tools/src/x-scheme.c +++ b/gettext-tools/src/x-scheme.c @@ -794,7 +794,7 @@ read_object (struct object *op, flag_context_ty outer_context) else { /* These are the argument positions. */ - if (inner.type == t_string) + if (argparser != NULL && inner.type == t_string) arglist_parser_remember (argparser, arg, string_of_object (&inner), inner_context, -- 2.47.3