cameraservice: memcpy AIDL header instead of directly writing buffer
camera_jpeg_blob_t and AIDL's CameraBlob might have different sizes and memory alignment requirement on some systems. Instead of attempting to modify the buffer through a struct pointer, this CL uses memcpy to replace the end of the buffer with the content of the AIDL header. This ensures that reading and writing the header always succeeds regardless of size and location of the jpeg buffer in memory. Bug: 233986162 Test: Camera CTS Passes, and verified by partner Change-Id: Ifcb03c98863108d9b278934b917d2e2c70160c8f
Loading
Please register or sign in to comment