Permalink
Browse files

Merge d40705f on remote branch

Change-Id: I13f43e6d7b66e1ea70738aa764dd9800a6c97794
  • Loading branch information...
Linux Build Service Account
Linux Build Service Account committed Jun 11, 2017
2 parents a381889 + d40705f commit 3b4fef61e3a1eabed9828ef23fa6825480988d70
Showing with 16 additions and 5 deletions.
  1. +16 −5 mm-audio/aenc-aac/qdsp6/src/omx_aac_aenc.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -4178,14 +4178,25 @@ OMX_ERRORTYPE omx_aac_aenc::fill_this_buffer_proxy
DEBUG_DETAIL("FTBP->Al_len[%lu]buf[%p]size[%d]numOutBuf[%d]\n",\
buffer->nAllocLen,m_tmp_out_meta_buf,
nReadbytes,nNumOutputBuf);
if(*m_tmp_out_meta_buf <= 0)
if(m_tmp_out_meta_buf == NULL)
return OMX_ErrorUndefined;
if(*m_tmp_out_meta_buf <= 0 || *m_tmp_out_meta_buf > CHAR_MAX)
return OMX_ErrorBadParameter;
szadifhr = AUDAAC_MAX_ADIF_HEADER_LENGTH;
szadifhr = AUDAAC_MAX_ADIF_HEADER_LENGTH;
numframes = *m_tmp_out_meta_buf;
metainfo = (int)((sizeof(ENC_META_OUT) * numframes)+
sizeof(unsigned char));
sizeof(unsigned char));
/*
* add bounds checking
*/
if ((metainfo > INT_MAX - szadifhr) ||
(buffer->nAllocLen < (nReadbytes + szadifhr)) ||
(metainfo > nReadbytes)) {
return OMX_ErrorBadParameter;
}
audaac_rec_install_adif_header_variable(0,sample_idx,
(OMX_U8)m_aac_param.nChannels);
(OMX_U8)m_aac_param.nChannels);
memcpy(buffer->pBuffer,m_tmp_out_meta_buf,metainfo);
memcpy(buffer->pBuffer + metainfo,&audaac_header_adif[0],szadifhr);
memcpy(buffer->pBuffer + metainfo + szadifhr,

0 comments on commit 3b4fef6

Please sign in to comment.