summaryrefslogtreecommitdiffstats
path: root/apps/codecs.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs.c')
-rw-r--r--apps/codecs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/codecs.c b/apps/codecs.c
index 4d2dd34ce0..9f34d26e14 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -203,8 +203,9 @@ static int codec_load_ram(struct codec_api *api)
return CODEC_ERROR;
}
- if (hdr->api_version > CODEC_API_VERSION
- || hdr->api_version < CODEC_MIN_API_VERSION) {
+ if (hdr->api_version != CODEC_API_VERSION ||
+ c_hdr->api_size > sizeof(struct codec_api))
+ {
logf("codec api version error");
lc_close(curr_handle);
curr_handle = NULL;