[PATCH 6/7] wined3d: Validate stream_idx in wined3d_device_set_stream_source_freq().

Henri Verbeet hverbeet at gmail.com
Thu Jan 28 07:51:01 CST 2016


On 28 January 2016 at 00:17, Józef Kucia <jkucia at codeweavers.com> wrote:
> @@ -1412,6 +1412,12 @@ HRESULT CDECL wined3d_device_set_stream_source_freq(struct wined3d_device *devic
>          return WINED3DERR_INVALIDCALL;
>      }
>
> +    if (stream_idx >= MAX_STREAMS)
> +    {
> +        FIXME("Stream index %u out of range.\n", stream_idx);
> +        return WINED3DERR_INVALIDCALL;
> +    }
This would have to be a WARN instead of a FIXME, but in general we
don't do this in wined3d unless we have to.



More information about the wine-devel mailing list