[PATCH xserver] modesetting: Fix uninitialized memory usage in drmmode_crtc_get_fb_id()
Lyude Paul
lyude at redhat.com
Thu Jun 28 02:17:20 UTC 2018
This got reviewed off-list by Karol Herbst <kherbst at redhat.com>. It's a no-
brainer, so I'll push it in just a moment
On Wed, 2018-06-27 at 20:30 -0400, Lyude Paul wrote:
> This really sucked to find out :(
>
> Signed-off-by: Lyude Paul <lyude at redhat.com>
> ---
> hw/xfree86/drivers/modesetting/drmmode_display.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c
> b/hw/xfree86/drivers/modesetting/drmmode_display.c
> index 375be4234..e27139d0e 100644
> --- a/hw/xfree86/drivers/modesetting/drmmode_display.c
> +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
> @@ -604,6 +604,8 @@ drmmode_crtc_get_fb_id(xf86CrtcPtr crtc, uint32_t
> *fb_id, int *x, int *y)
> drmmode_ptr drmmode = drmmode_crtc->drmmode;
> int ret;
>
> + *fb_id = 0;
> +
> if (drmmode_crtc->prime_pixmap) {
> if (!drmmode->reverse_prime_offload_mode) {
> msPixmapPrivPtr ppriv =
--
Cheers,
Lyude Paul
More information about the xorg-devel
mailing list