--- funcs/func_strings.c.orig 2010-09-21 17:04:16.000000000 +0200 +++ funcs/func_strings.c 2010-09-27 15:29:10.000000000 +0200 @@ -459,10 +459,10 @@ static int filter(struct ast_channel *ch if (*(args.allowed) == '-') { if (ast_get_encoded_char(args.allowed + 1, &c2, &consumed)) - c2 = -1; + c2 = c1; args.allowed += consumed + 1; - if ((c2 < c1 || c2 == -1) && !ast_opt_dont_warn) { + if ((unsigned char) c2 < (unsigned char) c1 && !ast_opt_dont_warn) { ast_log(LOG_WARNING, "Range wrapping in FILTER(%s,%s). This may not be what you want.\n", parse, args.string); } @@ -470,7 +470,7 @@ static int filter(struct ast_channel *ch * Looks a little strange, until you realize that we can overflow * the size of a char. */ - for (ac = c1; ac != c2; ac++) { + for (ac = (unsigned char) c1; ac != (unsigned char) c2; ac++) { bitfield[ac / 32] |= 1 << (ac % 32); } bitfield[ac / 32] |= 1 << (ac % 32);