Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 265e7f6062f797d1e7568996283cc3ff7d223886
      
https://github.com/WebKit/WebKit/commit/265e7f6062f797d1e7568996283cc3ff7d223886
  Author: Philippe Normand <ph...@igalia.com>
  Date:   2025-03-18 (Tue, 18 Mar 2025)

  Changed paths:
    M Source/WebCore/platform/audio/gstreamer/PlatformRawAudioDataGStreamer.cpp
    M Source/WebCore/platform/audio/gstreamer/PlatformRawAudioDataGStreamer.h

  Log Message:
  -----------
  [GStreamer][WebCodecs] Improve robustness of AudioData handling
https://bugs.webkit.org/show_bug.cgi?id=289946

Reviewed by Xabier Rodriguez-Calvar.

This patch fixes assertions/crashes in PlatformRawAudioDataGStreamer raised due 
to poor error
handling and invalid input data.

Co-authored-by: Frédéric Wang <fw...@igalia.com>

* Source/WebCore/platform/audio/gstreamer/PlatformRawAudioDataGStreamer.cpp:
(WebCore::PlatformRawAudioData::create): Return nullptr in case the audio info 
is invalid.
(WebCore::PlatformRawAudioDataGStreamer::planesOfSamples): Return a nullopt if 
the GStreamer says
the audio data is invalid.
(WebCore::PlatformRawAudioData::copyTo): Return early if the audio data is 
invalid or if the size of
the source buffer is smaller than the requested copyElementCount.
* Source/WebCore/platform/audio/gstreamer/PlatformRawAudioDataGStreamer.h: 
Change signature to
return an optional.

Canonical link: https://commits.webkit.org/292300@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to