Check record-length before dereferencing.
authorJoe Marshall <eval.apply@gmail.com>
Wed, 25 Jan 2012 06:42:47 +0000 (22:42 -0800)
committerJoe Marshall <eval.apply@gmail.com>
Wed, 25 Jan 2012 06:42:47 +0000 (22:42 -0800)
src/runtime/defstr.scm

index 652e811e4582a26d93ee9567c743b5b3dcd36509..af1d43ad9e9266c72e1452851facb095ad81fcd0 100644 (file)
@@ -790,6 +790,9 @@ differences:
                   (DECLARE
                    (IGNORE-REFERENCE-TRAPS (SET ,(close tag-name context))))
                   (AND (,(absolute '%RECORD? context) OBJECT)
+                       (,(absolute 'NOT context)
+                        (,(absolute 'ZERO? context)
+                         (,(absolute '%RECORD-LENGTH context) OBJECT)))
                        (,(absolute 'EQ? context)
                         (,(absolute '%RECORD-REF context) OBJECT 0)
                         ;++ Work around a bug in the expander.