Index: channels/chan_iax2.c =================================================================== --- channels/chan_iax2.c (revision 62039) +++ channels/chan_iax2.c (working copy) @@ -6732,6 +6732,9 @@ ast_mutex_unlock(&iaxsl[fr->callno]); return 1; } + /* Ensure text frames are NULL-terminated */ + if (f.frametype == AST_FRAME_TEXT && buf[res] != '\0') + buf[res++] = '\0'; f.datalen = res - sizeof(*fh); /* Handle implicit ACKing unless this is an INVAL, and only if this is