Text   |  XML   |  ReML   |   Visible Warnings:

Null Test After Dereference  at mate_util.c:1077

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

new_avpl_loose_match

(/home/sate/Testcases/c/cve/wireshark-1.2.0/plugins/mate/mate_util.c)expand/collapse
Show more  
 1025  extern AVPL* new_avpl_loose_match(const gchar* name,
 1026                                                                    AVPL* src,
 1027                                                                    AVPL* op,
 1028                                                                    gboolean copy_avps) {
 1029   
 1030          AVPL* newavpl = new_avpl(scs_subscribe(avp_strings, name));
 1031          AVPN* co = NULL;
 1032          AVPN* cs = NULL;
 1033          ptrdiff_t c;
 1034          AVP* m;
 1035          AVP* copy;
 1036   
 1037  #ifdef _AVP_DEBUGGING 
 1038          dbg_print(dbg_avpl_op,3,dbg_fp,"new_avpl_loose_match: %X src=%X op=%X name='%s'",newavpl,src,op,name);
 1039  #endif
 1040   
 1041   
 1042          cs = src->null.next;
 1043          co = op->null.next;
 1044          while(1) {
 1045   
 1046                  if (!co->avp) {
 1047                          return newavpl;
 1048                  }
 1049   
 1050                  if (!cs->avp) {
 1051                          return newavpl;
 1052                  }
 1053   
 1054   
 1055                  c = ADDRDIFF(co->avp->n, cs->avp->n);
 1056   
 1057                  if ( c > 0 ) {
 1058                          if (co->avp) co = co->next;
 1059                  } else if (c < 0) {
 1060                          if (cs->avp) cs = cs->next;
 1061                  } else {
 1062                          m = match_avp(cs->avp,co->avp);
 1063                          if(m) {
 1064   
 1065                                  if (copy_avps) {
 1066                                          copy = avp_copy(m);
 1067                                          if ( ! insert_avp(newavpl,copy) ) {
 1068                                                  delete_avp(copy);
 1069                                          }
 1070                                  } else {
 1071                                          insert_avp(newavpl,m);
 1072                                  }
 1073   
 1074   
 1075                          }
 1076   
 1077                          if (cs->avp) cs = cs->next;
 1078   
 1079                  }
 1080          }
 1081   
 1082  #ifdef _AVP_DEBUGGING 
 1083          dbg_print(dbg_avpl_op,6,dbg_fp,"new_avpl_loose_match: done!");
 1084  #endif
 1085   
 1086          return NULL;
 1087  }
Show more  




Change Warning 12269.30092 : Null Test After Dereference

Because they are very similar, this warning shares annotations with warning 12269.30094.

Priority:
State:
Finding:
Owner:
Note: