diff --git a/res/res_fax.c b/res/res_fax.c index 19b5e2acc0..0b7e69bdc5 100644 --- a/res/res_fax.c +++ b/res/res_fax.c @@ -467,7 +467,7 @@ static int update_modem_bits(enum ast_fax_modems *bits, const char *value) m[i] = NULL; } else { tok = strtok(v, ", "); - while (tok && (i < 5)) { + while (tok && i < ARRAY_LEN(m) - 1) { m[i++] = tok; tok = strtok(NULL, ", "); }