From 8f6472e0313f2998e76fe6c660243950f69cfcdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Tue, 26 Feb 2008 22:51:37 +0100 Subject: [PATCH] Fixed NULL-dereference in handling of the splice-operator. Rev: src/las.c:1.405 --- src/las.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/las.c b/src/las.c index 8e68e53545..ae592f52ce 100644 --- a/src/las.c +++ b/src/las.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: las.c,v 1.404 2008/01/28 18:41:50 grubba Exp $ +|| $Id: las.c,v 1.405 2008/02/26 21:51:37 grubba Exp $ */ #include "global.h" @@ -3472,12 +3472,14 @@ void fix_type_field(node *n) array_type, CAR(n)->type, 0); } free_type(array_type); + /* FIXME: The type field of the splice operator is not yet utilized. + * + * It probably ought to be something similar to MANY(..., VOID). + */ + n->type = index_type(CAR(n)->type, int_type_string, n); + } else { + copy_pike_type(n->type, mixed_type_string); } - /* FIXME: The type field of the splice operator is not yet utilized. - * - * It probably ought to be something similar to MANY(..., VOID). - */ - n->type = index_type(CAR(n)->type, int_type_string, n); break; case F_AUTO_MAP_MARKER: -- GitLab