Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Count constant arrays for the uniform_count. Fixes buffer overflow.
This one got found by AFL, too, but it's a legit bug that can happen with
legit shaders.
  • Loading branch information
icculus committed Oct 13, 2017
1 parent 77bb19c commit 2cf3ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader.c
Expand Up @@ -11852,8 +11852,8 @@ static void process_definitions(Context *ctx)
{
ctx->profile->array_emitter(ctx, var);
ctx->uniform_float4_count += var->count;
ctx->uniform_count++;
} // else
ctx->uniform_count++;
} // if
} // for

Expand Down

0 comments on commit 2cf3ac4

Please sign in to comment.