From 353bf9e6437fb1542d4bcf3d48659f7bb0a27b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Tue, 2 Jul 2013 20:52:14 +0200 Subject: [PATCH] Compiler: Fixed NULL-deref by docode(). Call fix_type_field() before calling docode() in eval_low() to ensure that the parsetree node types have been properly set. This fixes a NULL-deref in docode() when compiling the line: string system_module_path=master()->system_module_path[-1]; (The F_ARROW node in the rvalue had a NULL type). docode() requires that the parsetree node types h This fixes a NULL-deref in docode() when compiling the line (from lib/modules/Tools.pmod/Standalone.pmod/module.pmod:28): string system_module_path=master()->system_module_path[-1]; (The F_ARROW node in the rvalue had a NULL type). --- src/las.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/las.c b/src/las.c index 2d204d16d2..786563a65e 100644 --- a/src/las.c +++ b/src/las.c @@ -5236,6 +5236,8 @@ ptrdiff_t eval_low(node *n,int print_error) } #endif + fix_type_field(n); + if(Pike_compiler->num_parse_error) { return -1; } -- GitLab