Index: graphite-1.3.14/src/inc/opcodes.h
===================================================================
--- graphite-1.3.14.orig/src/inc/opcodes.h
+++ graphite-1.3.14/src/inc/opcodes.h
@@ -76,7 +76,8 @@ of the License or (at your option) any l
 
 #define push(n)             { *++sp = n; }
 #define pop()               (*sp--)
-#define slotat(x)           (map[(x)])
+#define slotat(x)           ((map + (x) >= &smap[-1] && map + (x) < smap.end()) ? \
+                                map[(x)] : (status = Machine::slot_offset_out_bounds, nullptr))
 #define DIE                 { is=seg.last(); status = Machine::died_early; EXIT(1); }
 #define POSITIONED          1
 
