• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/av


Commit MetaInfo

Révision388232f5d4815c1dc37f884d9448a93afbcc0f8b (tree)
l'heure2019-05-07 13:08:42
AuteurRay Essick <essick@goog...>
CommiterVasyl Gello

Message de Log

Reserve enough space for RTSP CSD

make parameters to GetSizeWidth() reflect values being used in
corresponding EncodeSize() invocations so we won't overflow the buffer.

Bug: 123701862
Test: y
Change-Id: I78596176e6042c95582494a8ae1b9c3160bf5955
(cherry picked from commit c025be8ce5f1b34bdf293ac367685c969bd430ba)

Change Summary

Modification

--- a/media/libstagefright/rtsp/APacketSource.cpp
+++ b/media/libstagefright/rtsp/APacketSource.cpp
@@ -377,8 +377,8 @@ static sp<ABuffer> MakeMPEG4VideoCodecSpecificData(
377377 ALOGI("VOL dimensions = %dx%d", *width, *height);
378378
379379 size_t len1 = config->size() + GetSizeWidth(config->size()) + 1;
380- size_t len2 = len1 + GetSizeWidth(len1) + 1 + 13;
381- size_t len3 = len2 + GetSizeWidth(len2) + 1 + 3;
380+ size_t len2 = len1 + GetSizeWidth(len1 + 13) + 1 + 13;
381+ size_t len3 = len2 + GetSizeWidth(len2 + 3) + 1 + 3;
382382
383383 sp<ABuffer> csd = new ABuffer(len3);
384384 uint8_t *dst = csd->data();