summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2016-06-20 17:00:14 -0700
committerThe Android Automerger <android-build@google.com>2016-06-23 15:05:18 -0700
commit1f24c730ab6ca5aff1e3137b340b8aeaeda4bdbc (patch)
tree240a349e5c0a5e783cd192317d3aa47c935861c2 /include
parentb351eabb428c7ca85a34513c64601f437923d576 (diff)
downloadframeworks_av-1f24c730ab6ca5aff1e3137b340b8aeaeda4bdbc.zip
frameworks_av-1f24c730ab6ca5aff1e3137b340b8aeaeda4bdbc.tar.gz
frameworks_av-1f24c730ab6ca5aff1e3137b340b8aeaeda4bdbc.tar.bz2
DO NOT MERGE: Camera: Adjust pointers to ANW buffers to avoid infoleak
Subtract address of a random static object from pointers being routed through app process. Bug: 28466701 Change-Id: Idcbfe81e9507433769672f3dc6d67db5eeed4e04
Diffstat (limited to 'include')
-rw-r--r--include/camera/ICameraRecordingProxy.h6
-rw-r--r--include/media/stagefright/CameraSource.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/include/camera/ICameraRecordingProxy.h b/include/camera/ICameraRecordingProxy.h
index 2aac284..4edf9cd 100644
--- a/include/camera/ICameraRecordingProxy.h
+++ b/include/camera/ICameraRecordingProxy.h
@@ -83,6 +83,12 @@ public:
virtual status_t startRecording(const sp<ICameraRecordingProxyListener>& listener) = 0;
virtual void stopRecording() = 0;
virtual void releaseRecordingFrame(const sp<IMemory>& mem) = 0;
+
+ // b/28466701
+ static size_t getCommonBaseAddress();
+ private:
+
+ static uint8_t baseObject;
};
// ----------------------------------------------------------------------------
diff --git a/include/media/stagefright/CameraSource.h b/include/media/stagefright/CameraSource.h
index 069e897..6c938a5 100644
--- a/include/media/stagefright/CameraSource.h
+++ b/include/media/stagefright/CameraSource.h
@@ -236,6 +236,9 @@ private:
status_t checkFrameRate(const CameraParameters& params,
int32_t frameRate);
+ static void adjustIncomingANWBuffer(IMemory* data);
+ static void adjustOutgoingANWBuffer(IMemory* data);
+
void stopCameraRecording();
status_t reset();