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 44edba3..9cb8b90 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;
          }
       }