Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion reference/src/clientimpl/src/sa_process_common_encryption.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
Expand Down
Loading