Changeset 920:cb439d57d0c5 in freeDiameter
- Timestamp:
- Feb 13, 2013, 2:42:33 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdproto/messages.c
r919 r920 1653 1653 struct avp * avp; 1654 1654 1655 if (buflen - offset < =AVPHDRSZ_NOVEND) {1655 if (buflen - offset < AVPHDRSZ_NOVEND) { 1656 1656 TRACE_DEBUG(INFO, "truncated buffer: remaining only %d bytes", buflen - offset); 1657 1657 return EBADMSG; … … 1671 1671 1672 1672 if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { 1673 if (buflen - offset < =4) {1673 if (buflen - offset < 4) { 1674 1674 TRACE_DEBUG(INFO, "truncated buffer: remaining only %d bytes for vendor and data", buflen - offset); 1675 1675 free(avp); … … 1681 1681 1682 1682 /* Check there is enough remaining data in the buffer */ 1683 if (buflen - offset < avp->avp_public.avp_len - GETAVPHDRSZ(avp->avp_public.avp_flags)) { 1683 if ( (avp->avp_public.avp_len > GETAVPHDRSZ(avp->avp_public.avp_flags)) 1684 && (buflen - offset < avp->avp_public.avp_len - GETAVPHDRSZ(avp->avp_public.avp_flags))) { 1684 1685 TRACE_DEBUG(INFO, "truncated buffer: remaining only %d bytes for data, and avp data size is %d", 1685 1686 buflen - offset,
Note: See TracChangeset
for help on using the changeset viewer.