Source: xorg-server
Version: 2:21.1.7-2
Severity: minor
Tags: patch

Dear Maintainer,

I've been testing the xorg-server debian package for bookworm. I realized
that although patch "present-Check-for-NULL-to-prevent-crash.patch" applies
after some Hunk fixes, the result is incorrect because the patch
is already available upstream.

chema@bookworm:~/package/xorg-server-debian/xorg-server-21.1.7/debian$ quilt
push
Applying patch present-Check-for-NULL-to-prevent-crash.patch
patching file present/present_scmd.c
Hunk #1 succeeded at 161 with fuzz 1 (offset 3 lines).
Hunk #2 succeeded at 205 with fuzz 1 (offset 6 lines).

Now at patch present-Check-for-NULL-to-prevent-crash.patch

So I recommend to remove this patch for bookworm and newer versions
of the xserver 21.1.7 already includes the path and is available on
21.1 branch since 21.1.4

The result at the final debian source does not harm but it is not
really nice as it is repeating the same validation:

static RRCrtcPtr
present_scmd_get_crtc(present_screen_priv_ptr screen_priv, WindowPtr window)
{
if (!screen_priv->info)
return NULL;

if (!screen_priv->info->get_crtc)
return NULL;

> if (!screen_priv->info->get_crtc)
> return NULL;

return (*screen_priv->info->get_crtc)(window);
}

------

static void
present_flush(WindowPtr window)
{
ScreenPtr screen = window->drawable.pScreen;
present_screen_priv_ptr screen_priv = present_screen_priv(screen);

if (!screen_priv)
return;

if (!screen_priv->info)
return;

> if (!screen_priv->info->flush)
> return;

if (!screen_priv->info->flush)
return;

(*screen_priv->info->flush) (window);
}

-- System Information:
Debian Release: 11.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-21-amd64 (SMP w/12 CPU threads)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8), LANGUAGE not
set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Reply via email to