Fix NULL pointer dereference am: 6e988ba832 am: 3735317327 am: 490dd170bf am: c96ae6403c am: e26d11fd1f am: 9f57b2d447 am: 115c5d36b2 am: 7881d834d2 am: 571f65a3e8 am: e0a921ca5c am: e684ba6f6f
am: b6c01c1cb3
Change-Id: Id1208e75a0d393248911b282504dbbc7e82129d9
diff --git a/arm-wt-22k/Android.mk b/arm-wt-22k/Android.mk
index b9ea9fd..6fde980 100644
--- a/arm-wt-22k/Android.mk
+++ b/arm-wt-22k/Android.mk
@@ -53,7 +53,7 @@
-D _8_BIT_SAMPLES -D _FILTER_ENABLED \
-D DLS_SYNTHESIZER \
-D _REVERB_ENABLED \
- -Wno-unused-parameter \
+ -Wno-unused-parameter -Werror \
# not using these options
# -D _WAVE_PARSER
@@ -103,4 +103,6 @@
LOCAL_SHARED_LIBRARIES := \
libutils libcutils
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/lib_src/ARM_synth_constants_gnu.inc
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/arm-wt-22k/lib_src/eas_mdls.c b/arm-wt-22k/lib_src/eas_mdls.c
index e2cb688..65b1c40 100644
--- a/arm-wt-22k/lib_src/eas_mdls.c
+++ b/arm-wt-22k/lib_src/eas_mdls.c
@@ -322,6 +322,7 @@
static const S_DLS_ART_VALUES defaultArt =
{
+ {
0, /* not modified */
-851, /* Mod LFO frequency: 5 Hz */
-7973, /* Mod LFO delay: 10 milliseconds */
@@ -379,6 +380,7 @@
1000, /* Default CC91 to reverb send: 100.0% */
0, /* Default chorus send: 0.0% */
1000 /* Default CC93 to chorus send: 100.0% */
+ }
};
/*------------------------------------
@@ -565,7 +567,7 @@
}
/* must have a ptbl chunk */
- if ((ptblSize == 0) || (ptblSize > DLS_MAX_WAVE_COUNT * sizeof(POOLCUE) + sizeof(POOLTABLE)))
+ if ((ptblSize == 0) || (ptblSize > (EAS_I32) (DLS_MAX_WAVE_COUNT * sizeof(POOLCUE) + sizeof(POOLTABLE))))
{
{ /* dpp: EAS_ReportEx(_EAS_SEVERITY_ERROR, "No ptbl chunk found"); */ }
return EAS_ERROR_UNRECOGNIZED_FORMAT;
diff --git a/arm-wt-22k/lib_src/eas_pan.h b/arm-wt-22k/lib_src/eas_pan.h
index cb0a90d..7b3cba5 100644
--- a/arm-wt-22k/lib_src/eas_pan.h
+++ b/arm-wt-22k/lib_src/eas_pan.h
@@ -31,7 +31,7 @@
*----------------------------------------------------------------------------
*/
-#ifndef EAS_PAN_H
+#ifndef _EAS_PAN_H
#define _EAS_PAN_H
#include "eas_types.h"
@@ -62,5 +62,5 @@
*/
void EAS_CalcPanControl (EAS_INT pan, EAS_I16 *pGainLeft, EAS_I16 *pGainRight);
-#endif
+#endif /* #ifndef _EAS_PAN_H */