Re: [Mesa-dev] [PATCH 1/2] glsl: fix heap-use-after-free in ast_declarator_list::hir()

2017-02-22 Thread Ian Romanick
On 02/09/2017 06:23 AM, Samuel Iglesias Gonsálvez wrote: > The get_variable_being_redeclared() function can free 'var' because > a re-declaration of an unsized array variable can establish the size, so > we set the array type to the 'earlier' declaration and free 'var' as it is > not needed

[Mesa-dev] [PATCH 1/2] glsl: fix heap-use-after-free in ast_declarator_list::hir()

2017-02-09 Thread Samuel Iglesias Gonsálvez
The get_variable_being_redeclared() function can free 'var' because a re-declaration of an unsized array variable can establish the size, so we set the array type to the 'earlier' declaration and free 'var' as it is not needed anymore. However, the same 'var' is referenced later in