|
From: <sv...@va...> - 2011-10-25 21:41:58
|
Author: florian
Date: 2011-10-25 22:37:15 +0100 (Tue, 25 Oct 2011)
New Revision: 12232
Log:
Fix an out-of-bounds array access found by IBM's BEAM checker.
Modified:
trunk/coregrind/m_machine.c
Modified: trunk/coregrind/m_machine.c
===================================================================
--- trunk/coregrind/m_machine.c 2011-10-25 20:01:41 UTC (rev 12231)
+++ trunk/coregrind/m_machine.c 2011-10-25 21:37:15 UTC (rev 12232)
@@ -587,7 +587,9 @@
}
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;
}
|