main: fail texture_storage() call if the size is not okay
authorXiong, James <james.xiong@intel.com>
Fri, 27 Apr 2018 15:34:47 +0000 (08:34 -0700)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 9 May 2018 23:34:31 +0000 (09:34 +1000)
Signed-off-by: Xiong, James <james.xiong@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/texstorage.c

index 44edba332357b279297fc0eced7b509657eab851..9cb8b900651e1adadc7479a46e31a46908f0f9f0 100644 (file)
@@ -445,6 +445,7 @@ texture_storage(struct gl_context *ctx, GLuint dims,
             _mesa_error(ctx, GL_OUT_OF_MEMORY,
                         "glTex%sStorage%uD(texture too large)",
                         suffix, dims);
+            return;
          }
       }