idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
150,900 | void WT_NoiseGenerator (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame)
{
EAS_PCM *pOutputBuffer;
EAS_I32 phaseInc;
EAS_I32 tmp0;
EAS_I32 tmp1;
EAS_I32 nInterpolatedSample;
EAS_I32 numSamples;
/* initialize some local variables */
numSamples = pWTIntFrame->numSamples;
if (numSa... | DoS Exec Code Overflow Mem. Corr. | 1 | void WT_NoiseGenerator (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame)
{
EAS_PCM *pOutputBuffer;
EAS_I32 phaseInc;
EAS_I32 tmp0;
EAS_I32 tmp1;
EAS_I32 nInterpolatedSample;
EAS_I32 numSamples;
/* initialize some local variables */
numSamples = pWTIntFrame->numSamples;
if (numSa... | @@ -33,6 +33,7 @@
*------------------------------------
*/
#include "log/log.h"
+#include <cutils/log.h>
#include "eas_types.h"
#include "eas_math.h"
@@ -92,6 +93,7 @@
numSamples = pWTIntFrame->numSamples;
if (numSamples <= 0) {
ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554... | CWE-119 | null | android_errorWriteLog(0x534e4554, "26366256");
|
150,901 | void WT_VoiceFilter (S_FILTER_CONTROL *pFilter, S_WT_INT_FRAME *pWTIntFrame)
{
EAS_PCM *pAudioBuffer;
EAS_I32 k;
EAS_I32 b1;
EAS_I32 b2;
EAS_I32 z1;
EAS_I32 z2;
EAS_I32 acc0;
EAS_I32 acc1;
EAS_I32 numSamples;
/* initialize some local variables */
numSamples = pWTIntFrame->num... | DoS Exec Code Overflow Mem. Corr. | 1 | void WT_VoiceFilter (S_FILTER_CONTROL *pFilter, S_WT_INT_FRAME *pWTIntFrame)
{
EAS_PCM *pAudioBuffer;
EAS_I32 k;
EAS_I32 b1;
EAS_I32 b2;
EAS_I32 z1;
EAS_I32 z2;
EAS_I32 acc0;
EAS_I32 acc1;
EAS_I32 numSamples;
/* initialize some local variables */
numSamples = pWTIntFrame->num... | @@ -33,6 +33,7 @@
*------------------------------------
*/
#include "log/log.h"
+#include <cutils/log.h>
#include "eas_types.h"
#include "eas_math.h"
@@ -92,6 +93,7 @@
numSamples = pWTIntFrame->numSamples;
if (numSamples <= 0) {
ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554... | CWE-119 | null | android_errorWriteLog(0x534e4554, "26366256");
|
150,902 | void WT_VoiceGain (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame)
{
EAS_I32 *pMixBuffer;
EAS_PCM *pInputBuffer;
EAS_I32 gain;
EAS_I32 gainIncrement;
EAS_I32 tmp0;
EAS_I32 tmp1;
EAS_I32 tmp2;
EAS_I32 numSamples;
#if (NUM_OUTPUT_CHANNELS == 2)
EAS_I32 gainLeft, gainRight;
#endif
... | DoS Exec Code Overflow Mem. Corr. | 1 | void WT_VoiceGain (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame)
{
EAS_I32 *pMixBuffer;
EAS_PCM *pInputBuffer;
EAS_I32 gain;
EAS_I32 gainIncrement;
EAS_I32 tmp0;
EAS_I32 tmp1;
EAS_I32 tmp2;
EAS_I32 numSamples;
#if (NUM_OUTPUT_CHANNELS == 2)
EAS_I32 gainLeft, gainRight;
#endif
... | @@ -33,6 +33,7 @@
*------------------------------------
*/
#include "log/log.h"
+#include <cutils/log.h>
#include "eas_types.h"
#include "eas_math.h"
@@ -92,6 +93,7 @@
numSamples = pWTIntFrame->numSamples;
if (numSamples <= 0) {
ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554... | CWE-119 | null | android_errorWriteLog(0x534e4554, "26366256");
|
150,903 | EAS_BOOL WT_CheckSampleEnd (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame, EAS_BOOL update)
{
EAS_U32 endPhaseAccum;
EAS_U32 endPhaseFrac;
EAS_I32 numSamples;
EAS_BOOL done = EAS_FALSE;
/* check to see if we hit the end of the waveform this time */
/*lint -e{703} use shift for performance */
... | DoS Exec Code Overflow Mem. Corr. | 1 | EAS_BOOL WT_CheckSampleEnd (S_WT_VOICE *pWTVoice, S_WT_INT_FRAME *pWTIntFrame, EAS_BOOL update)
{
EAS_U32 endPhaseAccum;
EAS_U32 endPhaseFrac;
EAS_I32 numSamples;
EAS_BOOL done = EAS_FALSE;
/* check to see if we hit the end of the waveform this time */
/*lint -e{703} use shift for performance */
... | @@ -29,6 +29,7 @@
// includes
#include "log/log.h"
+#include <cutils/log.h>
#include "eas_data.h"
#include "eas_report.h"
@@ -471,6 +472,7 @@
}
if (pWTIntFrame->numSamples < 0) {
ALOGE("b/26366256");
+ android_errorWriteLog(0x534e4554, "26366256");
pWTInt... | CWE-119 | null | android_errorWriteLog(0x534e4554, "26366256");
|
150,904 | void impeg2d_dec_p_mb_params(dec_state_t *ps_dec)
{
stream_t *ps_stream = &ps_dec->s_bit_stream;
UWORD16 u2_mb_addr_incr;
UWORD16 u2_total_len;
UWORD16 u2_len;
UWORD16 u2_mb_type;
UWORD32 u4_next_word;
const dec_mb_params_t *ps_dec_mb_params;
if(impeg2d_bit_stream_nxt(ps_stream,1) == 1)
{
... | DoS Exec Code Overflow Mem. Corr. | 1 | void impeg2d_dec_p_mb_params(dec_state_t *ps_dec)
WORD32 impeg2d_dec_p_mb_params(dec_state_t *ps_dec)
{
stream_t *ps_stream = &ps_dec->s_bit_stream;
UWORD16 u2_mb_addr_incr;
UWORD16 u2_total_len;
UWORD16 u2_len;
UWORD16 u2_mb_type;
UWORD32 u4_next_word;
const dec_mb_params_t *ps_dec_mb_para... | @@ -60,7 +60,7 @@
*
* Values Returned : None
*******************************************************************************/
-void impeg2d_dec_p_mb_params(dec_state_t *ps_dec)
+WORD32 impeg2d_dec_p_mb_params(dec_state_t *ps_dec)
{
stream_t *ps_stream = &ps_dec->s_bit_stream;
UWORD16 u2_mb_addr_incr;
@... | CWE-119 | null | WORD32 impeg2d_dec_p_mb_params(dec_state_t *ps_dec)
if(NULL == ps_dec_mb_params->pf_func_mb_params)
return -1;
return 0;
|
150,905 | void impeg2d_dec_pnb_mb_params(dec_state_t *ps_dec)
{
stream_t *ps_stream = &ps_dec->s_bit_stream;
UWORD16 u2_mb_addr_incr;
UWORD16 u2_total_len;
UWORD16 u2_len;
UWORD16 u2_mb_type;
UWORD32 u4_next_word;
const dec_mb_params_t *ps_dec_mb_params;
if(impeg2d_bit_stream_nxt(ps_stream,1) == 1)
... | DoS Exec Code Overflow Mem. Corr. | 1 | void impeg2d_dec_pnb_mb_params(dec_state_t *ps_dec)
WORD32 impeg2d_dec_pnb_mb_params(dec_state_t *ps_dec)
{
stream_t *ps_stream = &ps_dec->s_bit_stream;
UWORD16 u2_mb_addr_incr;
UWORD16 u2_total_len;
UWORD16 u2_len;
UWORD16 u2_mb_type;
UWORD32 u4_next_word;
const dec_mb_params_t *ps_dec_mb_p... | @@ -60,7 +60,7 @@
*
* Values Returned : None
*******************************************************************************/
-void impeg2d_dec_p_mb_params(dec_state_t *ps_dec)
+WORD32 impeg2d_dec_p_mb_params(dec_state_t *ps_dec)
{
stream_t *ps_stream = &ps_dec->s_bit_stream;
UWORD16 u2_mb_addr_incr;
@... | CWE-119 | null | WORD32 impeg2d_dec_pnb_mb_params(dec_state_t *ps_dec)
if(NULL == ps_dec_mb_params->pf_func_mb_params)
return -1;
if(NULL == ps_dec_mb_params->pf_func_mb_params)
return -1;
return 0;
|
150,906 | int equalizer_get_parameter(effect_context_t *context, effect_param_t *p,
uint32_t *size)
{
equalizer_context_t *eq_ctxt = (equalizer_context_t *)context;
int voffset = ((p->psize - 1) / sizeof(int32_t) + 1) * sizeof(int32_t);
int32_t *param_tmp = (int32_t *)p->data;
int32_t param = *param_tmp++;
int32_t param2;
... | +Info | 1 | int equalizer_get_parameter(effect_context_t *context, effect_param_t *p,
uint32_t *size)
{
equalizer_context_t *eq_ctxt = (equalizer_context_t *)context;
int voffset = ((p->psize - 1) / sizeof(int32_t) + 1) * sizeof(int32_t);
int32_t *param_tmp = (int32_t *)p->data;
int32_t param = *param_tmp++;
int32_t param2;
... | @@ -265,8 +265,12 @@
case EQ_PARAM_BAND_LEVEL:
ALOGV("%s: EQ_PARAM_BAND_LEVEL", __func__);
param2 = *param_tmp;
- if (param2 >= NUM_EQ_BANDS) {
+ if (param2 < 0 || param2 >= NUM_EQ_BANDS) {
p->status = -EINVAL;
+ if (param2 < 0) {
+ android_errorWrit... | CWE-200 | if (param2 >= NUM_EQ_BANDS) {
if (param2 >= NUM_EQ_BANDS) {
p->status = -EINVAL;
if (param2 >= NUM_EQ_BANDS) {
| if (param2 < 0 || param2 >= NUM_EQ_BANDS) {
if (param2 < 0) {
android_errorWriteLog(0x534e4554, "32438598");
ALOGW("\tERROR EQ_PARAM_BAND_LEVEL band %d", param2);
}
if (param2 < 0 || param2 >= NUM_EQ_BANDS) {
p->status = -EINVAL;
... |
150,907 | uint8_t rfc_parse_data(tRFC_MCB* p_mcb, MX_FRAME* p_frame, BT_HDR* p_buf) {
uint8_t ead, eal, fcs;
uint8_t* p_data = (uint8_t*)(p_buf + 1) + p_buf->offset;
uint8_t* p_start = p_data;
uint16_t len;
if (p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
RFCOMM_TRACE_ERROR("Bad Length1: %d", p_buf->len);
return (RFC_EVENT_B... | null | 1 | uint8_t rfc_parse_data(tRFC_MCB* p_mcb, MX_FRAME* p_frame, BT_HDR* p_buf) {
uint8_t ead, eal, fcs;
uint8_t* p_data = (uint8_t*)(p_buf + 1) + p_buf->offset;
uint8_t* p_start = p_data;
uint16_t len;
if (p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
RFCOMM_TRACE_ERROR("Bad Length1: %d", p_buf->len);
return (RFC_EVENT_B... | @@ -517,7 +517,16 @@
return (RFC_EVENT_BAD_FRAME);
}
RFCOMM_PARSE_TYPE_FIELD(p_frame->type, p_frame->pf, p_data);
- RFCOMM_PARSE_LEN_FIELD(eal, len, p_data);
+
+ eal = *(p_data)&RFCOMM_EA;
+ len = *(p_data)++ >> RFCOMM_SHIFT_LENGTH1;
+ if (eal == 0 && p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
+ len += (*... | CWE-125 | RFCOMM_PARSE_LEN_FIELD(eal, len, p_data);
|
eal = *(p_data)&RFCOMM_EA;
len = *(p_data)++ >> RFCOMM_SHIFT_LENGTH1;
if (eal == 0 && p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
len += (*(p_data)++ << RFCOMM_SHIFT_LENGTH2);
} else if (eal == 0) {
RFCOMM_TRACE_ERROR("Bad Length when EAL = 0: %d", p_buf->len);
android_errorWriteLog(0x534e4554, "78288018... |
150,908 | uint8_t rfc_parse_data(tRFC_MCB* p_mcb, MX_FRAME* p_frame, BT_HDR* p_buf) {
uint8_t ead, eal, fcs;
uint8_t* p_data = (uint8_t*)(p_buf + 1) + p_buf->offset;
uint8_t* p_start = p_data;
uint16_t len;
if (p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
RFCOMM_TRACE_ERROR("Bad Length1: %d", p_buf->len);
return (RFC_EVENT_B... | null | 1 | uint8_t rfc_parse_data(tRFC_MCB* p_mcb, MX_FRAME* p_frame, BT_HDR* p_buf) {
uint8_t ead, eal, fcs;
uint8_t* p_data = (uint8_t*)(p_buf + 1) + p_buf->offset;
uint8_t* p_start = p_data;
uint16_t len;
if (p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
RFCOMM_TRACE_ERROR("Bad Length1: %d", p_buf->len);
return (RFC_EVENT_B... | @@ -520,7 +520,7 @@
eal = *(p_data)&RFCOMM_EA;
len = *(p_data)++ >> RFCOMM_SHIFT_LENGTH1;
- if (eal == 0 && p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
+ if (eal == 0 && p_buf->len > RFCOMM_CTRL_FRAME_LEN) {
len += (*(p_data)++ << RFCOMM_SHIFT_LENGTH2);
} else if (eal == 0) {
RFCOMM_TRACE_ERROR("Bad L... | CWE-125 | if (eal == 0 && p_buf->len < RFCOMM_CTRL_FRAME_LEN) {
| if (eal == 0 && p_buf->len > RFCOMM_CTRL_FRAME_LEN) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.