diff --git a/src/modems/hayes.c b/src/modems/hayes.c index 531c99b..b2ff28f 100644 --- a/src/modems/hayes.c +++ b/src/modems/hayes.c @@ -4065,6 +4065,7 @@ static void _on_code_cusd(HayesChannel * channel, char const * answer) /* FIXME really implement */ if(sscanf(answer, "%u\"%31[^\"]\",%u", &u, buf, &u) >= 2) { + buf[sizeof(buf) - 1] = '\0'; event->notification.content = buf; hayes->helper->event(hayes->helper->modem, event); }