diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 4e5110bec5e42d083ef16b37ddb93668183837b1..d4a5c591df0987ae03dff34f5a8d4661a010a43f 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -5362,7 +5362,7 @@ static void *ss_thread(void *data)
 			else 
 				ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
 		}
-		dtmfbuf[0] = 0;
+		memset(dtmfbuf, 0, sizeof(dtmfbuf));
 		/* Wait for the first digit only if immediate=no */
 		if (!p->immediate)
 			/* Wait for the first digit (up to 5 seconds). */