[Mesa-dev] [PATCH 1/2] egl: don't allow eglGetConfigs to set num_configs param to a negative value

Matt Turner mattst88 at gmail.com
Wed Aug 12 10:52:37 PDT 2015

On Wed, Aug 12, 2015 at 8:35 AM, Frank Binns <frank.binns at imgtec.com> wrote:
> When a buffer is provided to eglGetConfigs it's supposed to set the value
> of the num_config parameter to the total number of configs that have been
> copied into this buffer. For some reason the EGL spec doesn't consider it
> to be an error to pass this function a buffer while specifying its size to
> be less than 0. Given this, one would expect this combination to result in
> the num_config parameter being set to 0 but this wasn't the case. This was
> due to the buffer size being copied straight into num_configs without being
> clamped to 0.
> This was causing the following dEQP EGL test to fail:
> dEQP-EGL.functional.query_config.get_configs.get_configs_bounds
> Signed-off-by: Frank Binns <frank.binns at imgtec.com>
> ---

Reviewed-by: Matt Turner <mattst88 at gmail.com>

More information about the mesa-dev mailing list