Text   |  XML   |  ReML   |   Visible Warnings:

Null Test After Dereference  at mate_util.c:847

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

merge_avpl

(/home/sate/Testcases/c/cve/wireshark-1.2.0/plugins/mate/mate_util.c)expand/collapse
Show more  
 825  extern void merge_avpl(AVPL* dst, AVPL* src, gboolean copy_avps) {
 826          AVPN* cd = NULL;
 827          AVPN* cs = NULL;
 828          ptrdiff_t c;
 829          AVP* copy;
 830   
 831  #ifdef _AVP_DEBUGGING 
 832          dbg_print(dbg_avpl_op,3,dbg_fp,"merge_avpl: %X %X",dst,src);
 833  #endif
 834   
 835          cs = src->null.next;
 836          cd = dst->null.next;
 837   
 838          while(cs->avp) {
 839   
 840                  if(cd->avp) {
 841                          c = ADDRDIFF(cd->avp->n,cs->avp->n);
 842                  } else {
 843                          c = -1;
 844                  }
 845   
 846                  if (c > 0) {
 847                          if (cd->avp) cd = cd->next;
 848                  } else if (c < 0) {
 849                          if (copy_avps) {
 850                                  copy = avp_copy(cs->avp);
 851                                  if ( ! insert_avp(dst,copy) ) {
 852                                          delete_avp(copy);
 853                                  }
 854                          } else {
 855                                  insert_avp(dst,cs->avp);
 856                          }
 857   
 858                          cs = cs->next;
 859                  } else {
 860                          if ( ! cd->avp || ! (cd->avp->v == cs->avp->v)  ) {
 861                                  if (copy_avps) {
 862                                          copy = avp_copy(cs->avp);
 863                                          if ( ! insert_avp(dst,copy) ) {
 864                                                  delete_avp(copy);
 865                                          }
 866                                  } else {
 867                                          insert_avp(dst,cs->avp);
 868                                  }
 869                          }
 870                          cs = cs->next;
 871                          if (cd->avp) cd = cd->next;
 872                  }
 873          }
 874   
 875  #ifdef _AVP_DEBUGGING 
 876          dbg_print(dbg_avpl_op,8,dbg_fp,"merge_avpl: done");
 877  #endif
 878   
 879          return;
 880  }
Show more  




Change Warning 12267.30085 : Null Test After Dereference

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

Priority:
State:
Finding:
Owner:
Note: