Navigation


Changeset 720:2c7c423eaba9 in freeDiameter


Ignore:
Timestamp:
Feb 21, 2011, 6:30:20 PM (10 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Have AVP values 0-terminated for safety (one should not rely on this and use the size)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/messages.c

    r710 r720  
    17731773                        avp->avp_storage.os.len = avp->avp_public.avp_len - GETAVPHDRSZ( avp->avp_public.avp_flags );
    17741774                        if (avp->avp_storage.os.len) {
    1775                                 CHECK_MALLOC(  avp->avp_storage.os.data = malloc(avp->avp_storage.os.len)  );
     1775                                CHECK_MALLOC(  avp->avp_storage.os.data = os0dup(avp->avp_source, avp->avp_storage.os.len)  );
    17761776                                avp->avp_mustfreeos = 1;
    1777                                 memcpy(avp->avp_storage.os.data, avp->avp_source, avp->avp_storage.os.len);
    17781777                        } else {
    17791778                                avp->avp_storage.os.data = NULL;
Note: See TracChangeset for help on using the changeset viewer.