[Mesa-dev] [PATCH 07/10] mesa: Add missing null check in _mesa_parse_arb_program()
Ian Romanick
idr at freedesktop.org
Mon Feb 17 12:51:31 PST 2014
On 02/17/2014 08:21 AM, Juha-Pekka Heikkila wrote:
> Add missing null check in program_parse.tab.c through
> program_parse.y
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/mesa/program/program_parse.y | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/mesa/program/program_parse.y b/src/mesa/program/program_parse.y
> index 6dde69d..cfc2cfe 100644
> --- a/src/mesa/program/program_parse.y
> +++ b/src/mesa/program/program_parse.y
> @@ -2749,6 +2749,11 @@ _mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *st
> */
> state->prog->Instructions =
> _mesa_alloc_instructions(state->prog->NumInstructions + 1);
> +
> + if (state->prog->Instructions == NULL) {
> + goto error;
> + }
> +
> inst = state->inst_head;
> for (i = 0; i < state->prog->NumInstructions; i++) {
> struct asm_instruction *const temp = inst->next;
>
More information about the mesa-dev
mailing list