dictionary: Fix potential access beyond allocated memory.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 10 Apr 2010 04:45:50 +0000 (21:45 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 12 Apr 2010 03:39:02 +0000 (20:39 -0700)
commit33e610616a2b48f9a7eb56c4ebb0325b66df0376
tree949b11cc1f9f1953fb6ec82145dedfebb5d88ab6
parent58e33e78895d4f19240b679a8d0656643a482f41
dictionary: Fix potential access beyond allocated memory.

This code replaces the dictionary's "var" array by another one, so it must
either update "var_cap" to the allocated size or allocate "var_cap" (not
"var_cnt") elements.  I chose the latter fix.
src/data/dictionary.c