[Mesa-dev] [PATCH] glsl: initialise pointer to NULL
Jakob Sinclair
sinclair.jakob at openmailbox.org
Mon Jun 6 14:45:43 UTC 2016
On 2016-06-06 15:48, Iago Toral wrote:
> Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
>
I don't have push access so I would be very happy if you could push this
patch for me. Thanks!
--
Mvh Jakob Sinclair
> On Sat, 2016-06-04 at 01:09 +0200, Jakob Sinclair wrote:
>> Could cause issues if you tried to read from an uninitialised pointer.
>> This just initalises the pointer to null to avoid that being a
>> problem.
>> Discovered by Coverity.
>>
>> CID: 1343616
>>
>> Signed-off-by: Jakob Sinclair <sinclair.jakob at openmailbox.org>
>> ---
>> src/compiler/glsl/glsl_parser_extras.cpp | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/src/compiler/glsl/glsl_parser_extras.cpp
>> b/src/compiler/glsl/glsl_parser_extras.cpp
>> index c9654ac..42b039e 100644
>> --- a/src/compiler/glsl/glsl_parser_extras.cpp
>> +++ b/src/compiler/glsl/glsl_parser_extras.cpp
>> @@ -1602,6 +1602,7 @@ ast_struct_specifier::ast_struct_specifier(const
>> char *identifier,
>> name = identifier;
>>
>> this->declarations.push_degenerate_list_at_head(&declarator_list->link);
>> is_declaration = true;
>> + layout = NULL;
>> }
>>
>> void ast_subroutine_list::print(void) const
More information about the mesa-dev
mailing list