Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92f9f71e authored by Chad Brubaker's avatar Chad Brubaker
Browse files

Whitelist *ToPlanar from integer sanitization

SoftVideoEncoderOMXComponent::Convert*ToPlanar methods use overflow in
value computation when converting between formats. These methods are
safe so whitelist them from unsigned overflow sanitization.
Bug: 23110888

Change-Id: Ia9978b54b0171a51a49723ec50d959808b086124
parent 072d9eb2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -349,6 +349,7 @@ OMX_ERRORTYPE SoftVideoEncoderOMXComponent::internalGetParameter(
}

// static
__attribute__((no_sanitize("integer")))
void SoftVideoEncoderOMXComponent::ConvertFlexYUVToPlanar(
        uint8_t *dst, size_t dstStride, size_t dstVStride,
        struct android_ycbcr *ycbcr, int32_t width, int32_t height) {
@@ -391,6 +392,7 @@ void SoftVideoEncoderOMXComponent::ConvertFlexYUVToPlanar(
}

// static
__attribute__((no_sanitize("integer")))
void SoftVideoEncoderOMXComponent::ConvertYUV420SemiPlanarToYUV420Planar(
        const uint8_t *inYVU, uint8_t* outYUV, int32_t width, int32_t height) {
    // TODO: add support for stride
@@ -421,6 +423,7 @@ void SoftVideoEncoderOMXComponent::ConvertYUV420SemiPlanarToYUV420Planar(
}

// static
__attribute__((no_sanitize("integer")))
void SoftVideoEncoderOMXComponent::ConvertRGB32ToPlanar(
        uint8_t *dstY, size_t dstStride, size_t dstVStride,
        const uint8_t *src, size_t width, size_t height, size_t srcStride,