math/gfreduce.[ch]: Fix out-of-bounds memory access.
[u/mdw/catacomb] / math / gfreduce.h
index 2c8a884..9f69585 100644 (file)
@@ -34,6 +34,8 @@
 
 /*----- Header files ------------------------------------------------------*/
 
+#include <stdio.h>
+
 #ifndef CATACOMB_GF_H
 #  include "gf.h"
 #endif
@@ -58,7 +60,8 @@ typedef struct gfreduce {
   mpw mask;                            /* Mask for degree word */
   mp *p;                               /* Copy of the polynomial */
   size_t in;                           /* Number of instruction words */
-  gfreduce_instr *iv, *liv;            /* Vector of instructions */
+  gfreduce_instr *iv;                  /* Vector of instructions */
+  gfreduce_instr *fiv;                 /* Final-pass instruction suffix */
 } gfreduce;
 
 /*----- Functions provided ------------------------------------------------*/