diff options
Diffstat (limited to 'apps/codecs.c')
-rw-r--r-- | apps/codecs.c | 5 |
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) | |||
203 | return CODEC_ERROR; | 203 | return CODEC_ERROR; |
204 | } | 204 | } |
205 | 205 | ||
206 | if (hdr->api_version > CODEC_API_VERSION | 206 | if (hdr->api_version != CODEC_API_VERSION || |
207 | || hdr->api_version < CODEC_MIN_API_VERSION) { | 207 | c_hdr->api_size > sizeof(struct codec_api)) |
208 | { | ||
208 | logf("codec api version error"); | 209 | logf("codec api version error"); |
209 | lc_close(curr_handle); | 210 | lc_close(curr_handle); |
210 | curr_handle = NULL; | 211 | curr_handle = NULL; |