]> granicus.if.org Git - flex/commitdiff
fix possible uninitialized array values
authorJaska Uimonen <jaska.uimonen@helsinki.fi>
Mon, 27 Jul 2015 07:59:58 +0000 (10:59 +0300)
committerWill Estes <westes575@gmail.com>
Thu, 6 Aug 2015 13:27:30 +0000 (09:27 -0400)
src/dfa.c

index c16a010fcff374ecb95d98ebca565b5fc80983ee..0a68e3a98c970e9140af36042aced3bb3036d08c 100644 (file)
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -400,7 +400,7 @@ void ntod ()
         * from 1 to CSIZE, so their size must be CSIZE + 1.
         */
        int     duplist[CSIZE + 1], state[CSIZE + 1];
-       int     targfreq[CSIZE + 1], targstate[CSIZE + 1];
+       int     targfreq[CSIZE + 1] = {0}, targstate[CSIZE + 1];
 
        /* accset needs to be large enough to hold all of the rules present
         * in the input, *plus* their YY_TRAILING_HEAD_MASK variants.