diff --git a/reference/src/clientimpl/src/sa_process_common_encryption.c b/reference/src/clientimpl/src/sa_process_common_encryption.c index 8d2d165e..811c884c 100644 --- a/reference/src/clientimpl/src/sa_process_common_encryption.c +++ b/reference/src/clientimpl/src/sa_process_common_encryption.c @@ -1,5 +1,5 @@ /* - * Copyright 2020-2025 Comcast Cable Communications Management, LLC + * Copyright 2020-2026 Comcast Cable Communications Management, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,6 +81,20 @@ sa_status sa_process_common_encryption( break; } + if (samples[i].out->buffer_type != SA_BUFFER_TYPE_CLEAR && + samples[i].out->buffer_type != SA_BUFFER_TYPE_SVP) { + ERROR("Invalid out buffer_type"); + status = SA_STATUS_INVALID_PARAMETER; + break; + } + + if (samples[i].in->buffer_type != SA_BUFFER_TYPE_CLEAR && + samples[i].in->buffer_type != SA_BUFFER_TYPE_SVP) { + ERROR("Invalid in buffer_type"); + status = SA_STATUS_INVALID_PARAMETER; + break; + } + process_common_encryption->api_version = API_VERSION; memcpy(process_common_encryption->iv, samples[i].iv, samples[i].iv_length); process_common_encryption->crypt_byte_block = samples[i].crypt_byte_block;