From 739c65c54cb0e957df5e9b76f93fb02554e5cac3 Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 4 May 2022 23:52:30 +0100 Subject: moved everything to new file formatting --- ...webrtc-check-existence-of-cursor-metadata.patch | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 repo/apps/chromium/webrtc-check-existence-of-cursor-metadata.patch (limited to 'repo/apps/chromium/webrtc-check-existence-of-cursor-metadata.patch') diff --git a/repo/apps/chromium/webrtc-check-existence-of-cursor-metadata.patch b/repo/apps/chromium/webrtc-check-existence-of-cursor-metadata.patch new file mode 100644 index 0000000..0c7e731 --- /dev/null +++ b/repo/apps/chromium/webrtc-check-existence-of-cursor-metadata.patch @@ -0,0 +1,31 @@ +From c2cd814cdd8cbf8dda6ccec2266327a5321fbde8 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Tue, 15 Mar 2022 14:31:55 +0100 +Subject: [PATCH] PipeWire capturer: check existence of cursor metadata + +Check whether there are any cursor metadata before we try to validate +and use them, otherwise we might crash on this. + +Bug: webrtc:13429 +Change-Id: I365da59a189b6b974cebafc94fec49d5b942efae +Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255601 +Reviewed-by: Alexander Cooper +Commit-Queue: Alexander Cooper +Cr-Commit-Position: refs/heads/main@{#36240} +--- + .../desktop_capture/linux/wayland/shared_screencast_stream.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +index a8c86e26..9e81df4c 100644 +--- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc ++++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +@@ -650,7 +650,7 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { + const struct spa_meta_cursor* cursor = + static_cast(spa_buffer_find_meta_data( + spa_buffer, SPA_META_Cursor, sizeof(*cursor))); +- if (spa_meta_cursor_is_valid(cursor)) { ++ if (cursor && spa_meta_cursor_is_valid(cursor)) { + struct spa_meta_bitmap* bitmap = nullptr; + + if (cursor->bitmap_offset) -- cgit v1.2.1