From e71ada450bd63cff644899f0312a50747b0f4ae1 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 27 Aug 2020 13:59:25 -0400 Subject: [PATCH] Fix crash This commit fixes the memcpy size calculation so it won't crash if the destination stride is bigger than the source stride Related: #1844993 --- 0001-vnc-pipewire-stream-Handle-stride-mismatch.patch | 2 +- gnome-remote-desktop.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/0001-vnc-pipewire-stream-Handle-stride-mismatch.patch b/0001-vnc-pipewire-stream-Handle-stride-mismatch.patch index 59bc460..dcdad19 100644 --- a/0001-vnc-pipewire-stream-Handle-stride-mismatch.patch +++ b/0001-vnc-pipewire-stream-Handle-stride-mismatch.patch @@ -63,7 +63,7 @@ index 88c07be..261292a 100644 + { + memcpy (((uint8_t *) frame->data) + y * dst_stride, + ((uint8_t *) src_data) + y * src_stride, -+ dst_stride); ++ stream->spa_format.size.width * 4); + } if (map) diff --git a/gnome-remote-desktop.spec b/gnome-remote-desktop.spec index 4ff22e3..5c85c4c 100644 --- a/gnome-remote-desktop.spec +++ b/gnome-remote-desktop.spec @@ -2,7 +2,7 @@ Name: gnome-remote-desktop Version: 0.1.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GNOME Remote Desktop screen share service License: GPLv2+