summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp/ASessionDescription.cpp
diff options
context:
space:
mode:
authorJessica Wagantall <jwagantall@cyngn.com>2016-09-07 14:24:46 -0700
committerJessica Wagantall <jwagantall@cyngn.com>2016-09-07 14:24:46 -0700
commitd9a8909b45b516f54460c2bb13af31a9639fe703 (patch)
tree9fa13ec5ed0a2fc8f5ed4fd89dd29c0cb445cd42 /media/libstagefright/rtsp/ASessionDescription.cpp
parentbdb54da9baf8349a1f030064c3af4ff7318f4771 (diff)
parent6679b5088f36693f5708dcaedd0c9ab7c66df27c (diff)
downloadframeworks_av-d9a8909b45b516f54460c2bb13af31a9639fe703.zip
frameworks_av-d9a8909b45b516f54460c2bb13af31a9639fe703.tar.gz
frameworks_av-d9a8909b45b516f54460c2bb13af31a9639fe703.tar.bz2
Merge tag 'android-6.0.1_r66' into HEAD
Android 6.0.1 release 66 Change-Id: I1d3eb6b66b7482149fe93647c278065fa46dc518
Diffstat (limited to 'media/libstagefright/rtsp/ASessionDescription.cpp')
-rw-r--r--media/libstagefright/rtsp/ASessionDescription.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/media/libstagefright/rtsp/ASessionDescription.cpp b/media/libstagefright/rtsp/ASessionDescription.cpp
index 92ad1ec..497fae6 100644
--- a/media/libstagefright/rtsp/ASessionDescription.cpp
+++ b/media/libstagefright/rtsp/ASessionDescription.cpp
@@ -17,6 +17,7 @@
//#define LOG_NDEBUG 0
#define LOG_TAG "ASessionDescription"
#include <utils/Log.h>
+#include <cutils/log.h>
#include "ASessionDescription.h"
@@ -211,12 +212,12 @@ void ASessionDescription::getFormatType(
*PT = x;
- char key[20];
- sprintf(key, "a=rtpmap:%lu", x);
+ char key[32];
+ snprintf(key, sizeof(key), "a=rtpmap:%lu", x);
CHECK(findAttribute(index, key, desc));
- sprintf(key, "a=fmtp:%lu", x);
+ snprintf(key, sizeof(key), "a=fmtp:%lu", x);
if (!findAttribute(index, key, params)) {
params->clear();
}
@@ -228,8 +229,11 @@ bool ASessionDescription::getDimensions(
*width = 0;
*height = 0;
- char key[20];
- sprintf(key, "a=framesize:%lu", PT);
+ char key[33];
+ snprintf(key, sizeof(key), "a=framesize:%lu", PT);
+ if (PT > 9999999) {
+ android_errorWriteLog(0x534e4554, "25747670");
+ }
AString value;
if (!findAttribute(index, key, &value)) {
return false;