Control: tags -1 + patch

The attached patch fixes it for me.

The const annotation is bogus, because this variable is going to be modified in the next line.

* Adrian Bunk <b...@debian.org>, 2017-07-16, 19:10:
$ pescan test.exe
file entropy:                    5.924796 (normal)
fpu anti-disassembly:            no
imagebase:                       normal
entrypoint:                      normal
DOS stub:                        normal
TLS directory:                   found - 1 function(s)
timestamp:                       normal
section count:                   15 (high)
Segmentation fault

Good catch. My patch seems to fix this, too.

--
Jakub Wilk
--- a/src/output.c
+++ b/src/output.c
@@ -288,7 +288,7 @@
 	scope->depth = scope_depth + 1;
 
 	if (scope_depth > 0) {
-		output_scope_t * const parent_scope = NULL;
+		output_scope_t * parent_scope = NULL;
 		STACK_PEEK(g_scope_stack, (void *)&parent_scope);
 		scope->parent_type = parent_scope->type;
 	}

Reply via email to