diff --git a/libs/openzap/src/isdn/Q921.c b/libs/openzap/src/isdn/Q921.c index 2c7c740251..d2ed969ba9 100644 --- a/libs/openzap/src/isdn/Q921.c +++ b/libs/openzap/src/isdn/Q921.c @@ -576,6 +576,7 @@ static int Q921LogMesg(L2TRUNK trunk, Q921LogLevel_t level, L2UCHAR received, L2 if(!mes) return 0; + memset(buf, 0, sizeof(buf)); left = sizeof(buf) - 1; @@ -598,6 +599,8 @@ static int Q921LogMesg(L2TRUNK trunk, Q921LogLevel_t level, L2UCHAR received, L2 L2UCHAR *pmes = mes + trunk->Q921HeaderSpace; struct Q921_Link *link; + memset(pbuf, 0, sizeof(pbuf)); + pleft = sizeof(pbuf); poffset = 0;