]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix an out-of-bounds array access found by IBM's BEAM checker.
authorFlorian Krohm <florian@eich-krohm.de>
Tue, 25 Oct 2011 21:37:15 +0000 (21:37 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Tue, 25 Oct 2011 21:37:15 +0000 (21:37 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12232

coregrind/m_machine.c

index 912609636e24cf4c6ddb6f8b4f50f243cefc9514..5df9e043a89b9738d3db6f92fb4b926cd6c2fd66 100644 (file)
@@ -587,7 +587,9 @@ static UInt VG_(get_machine_model)(void)
    }
 
    VG_(free)( file_buf );
-   VG_(debugLog)(1, "machine", "model = %s\n", model_map[model].name);
+   VG_(debugLog)(1, "machine", "model = %s\n",
+                 model == VEX_S390X_MODEL_INVALID ? "UNKNOWN"
+                                                  : model_map[model].name);
 
    return model;
 }