isl_tab_extend_vars: fix buffer overflow
max_var is the capacity of the buffer, but was not set to the real size of
the buffer after realloc.
If max_var > n_var during a call of isl_tab_extend_vars, max_var would
be set to max_var+n_new, although only n_var+n_new has been allocated.
Other code (notably add_sub_vars) assumes that it can write up to
max_var elements, but writes beyond the allocated buffer when accessing
the last elements.
Signed-off-by: Michael Kruse <isl@meinersbur.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>