Fixed 1 issue in each of the affected files.
ASTERISK-25494 #close
Reported-by: George Joseph
Tested-by: George Joseph
Change-Id: I818f149cd66a93b062df421e1c73c7942f5a4a77
cadence_is_ok = 0;
}
+ /* This check is only needed to satisfy the compiler that element_count can't cause an out of bounds */
+ if (element_count >= ARRAY_LEN(c)) {
+ element_count = ARRAY_LEN(c) - 1;
+ }
+
/* Ring cadences cannot be negative */
for (i = 0; i < element_count; i++) {
if (c[i] == 0) {
AST_LIST_TRAVERSE(ast_channel_varshead(ast), current, entries) {
if (!(strcasecmp(ast_var_name(current),"SKINNY_AUTOANSWER"))) {
- if (d->hookstate == SKINNY_ONHOOK && !sub->aa_sched < 0) {
+ if (d->hookstate == SKINNY_ONHOOK && !(sub->aa_sched < 0)) {
char buf[24];
int aatime;
char *stringp = buf, *curstr;
f.frametype = AST_FRAME_TEXT;
f.subclass.integer = 0;
f.offset = 0;
- f.data.ptr = &subcmd->u.display.text;
+ f.data.ptr = (void *)&subcmd->u.display.text;
f.datalen = subcmd->u.display.length + 1;
ast_queue_frame(owner, &f);
ast_channel_unlock(owner);