diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-08-21 09:30:12 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-21 10:38:31 -0700 |
commit | 9cee21f0c9aba71c6cfaaade5782aa805287e139 (patch) | |
tree | 62c5113e3a2953fb4bb801511e6a3927443c258e | |
parent | 5bdc9096b7c2aa4c5363a5c0a592e6d7ff7b34ed (diff) |
panfrost: Prevent potential integer overflow in instancing
Signed-off-by: Alyssa Rosenzweig <[email protected]>
-rw-r--r-- | src/gallium/drivers/panfrost/pan_instancing.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_instancing.c b/src/gallium/drivers/panfrost/pan_instancing.c index cd93fa7be9c..30023725b2e 100644 --- a/src/gallium/drivers/panfrost/pan_instancing.c +++ b/src/gallium/drivers/panfrost/pan_instancing.c @@ -228,7 +228,7 @@ panfrost_vertex_instanced( /* Apply round-down algorithm? e <= 2^shift?. XXX: The blob * seems to use a different condition */ - if (e <= (1 << shift)) { + if (e <= (1ll << shift)) { magic_divisor = m - 1; extra_flags = 1; } |