Index: apps/app_milliwatt.c =================================================================== --- apps/app_milliwatt.c (revision 359210) +++ apps/app_milliwatt.c (working copy) @@ -78,7 +78,7 @@ static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples) { unsigned char buf[AST_FRIENDLY_OFFSET + 640]; - const int maxsamples = ARRAY_LEN(buf); + const int maxsamples = ARRAY_LEN(buf) - AST_FRIENDLY_OFFSET; int i, *indexp = (int *) data; struct ast_frame wf = { .frametype = AST_FRAME_VOICE,