LibWebRTC might crash with frames having a null width or height
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Jun 2017 02:50:50 +0000 (02:50 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Jun 2017 02:50:50 +0000 (02:50 +0000)
commit0cadd1ae9e1c999200d288e984204025d89a2f02
tree47d34cc4d594a34b700fc9bfe7042e6004546c55
parentd4fba8c84bd7e549ff2b89ccd362d56f725df443
LibWebRTC might crash with frames having a null width or height
https://bugs.webkit.org/show_bug.cgi?id=172842
<rdar://problem/32514813>

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-01
Reviewed by Jon Lee.

Do not send black frames in case the video width or height is zero.
Also ensure that even if a null buffer is returned by the pool, no crash might actually happen.

* platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:
(WebCore::RealtimeOutgoingVideoSource::sendBlackFramesIfNeeded):
(WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp