Navigation


Changeset 1252:5c6e94202c64 in freeDiameter for libfdproto


Ignore:
Timestamp:
Jan 14, 2014, 12:35:42 AM (10 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Fix dump of Failed-AVP content as a value is set while the model is not

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/dictionary.c

    r1121 r1252  
    15111511        FD_DUMP_HANDLE_OFFSET();
    15121512       
    1513         /* Check the parameters are correct */
    1514         CHECK_PARAMS_DO( avp_value && verify_object(model) && (model->type == DICT_AVP), return NULL );
     1513        /* Handle invalid parameters */
     1514        if (!avp_value) {
     1515                CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(avp value not set)"), return NULL);
     1516                return *buf;
     1517        }
     1518
     1519        if (!model) {
     1520                CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(model not set)"), return NULL);
     1521                return *buf;
     1522        }
     1523       
     1524        if (! ( verify_object(model) && (model->type == DICT_AVP) )) {
     1525                CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(invalid model)"), return NULL);
     1526                return *buf;
     1527        }
    15151528       
    15161529        /* Get the type definition of this AVP */
Note: See TracChangeset for help on using the changeset viewer.