Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at pvmgs_func.c:921

Categories: LANG.MEM.NPD CWE:476
Warning ID: 558.29353
Procedure: gs_static
Trace: view
Modified: Thu Nov 26 11:38:58 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
ProblemLineSource
   /kat0/fletcher/SATE/2010/pvm3/pvmgs/pvmgs_func.c
   Enter gs_static
 875 gs_static(gname, size, tid, hash_list, ngroups) 
 876 char *gname;
 877 int size;
 878 int tid;
 879 GROUP_LIST_PTR hash_list;
 880 int *ngroups;
 881 {
 882         int i, info;
 883  
 884         GROUP_STRUCT_PTR group;
 885  
 886         /* check for valid group name */ 
 887         if (gname == (char*) 0 || *gname == '\0')
 888                 return(PvmNullGroup);
 889  
 890         group = gs_group(gname, hash_list, ngroups, NOCREATE);
 891         if (group == (GROUP_STRUCT_PTR) NULL)
 892                 return(PvmNoGroup);
 893  
 894         if (group->staticgroup == STATIC)
 895                 return(PvmDupGroup);
 896  
 897         for (i = 0; i < group->maxntids; i++) /* tid is in group?          */ 
 898                 if (group->tids[i] == tid) break;
 899                         if (i == group->maxntids)  
 900                                 return(PvmNotInGroup);
 901          
 902         /* if it's the whole group then set the size to the # in the group */ 
 903         if (size == -1)  
 904                 size = group->ntids;
 905          
 906         if (group->sgroup_count == -1)  /* first to form the static group  */ 
 907         {
 908                 group->sgroup_count = size;
 909                 group->sgroup_reached = 0;
 910         }
 911         else 
 912         {
 913                 if (size != group->sgroup_count)  /* make sure counts match    */ 
 914                         return(PvmMismatch);
 915         }
 916          
 917         /* store the tid */ 
 918         group->stids = gs_realloc_int_array(group->sgroup_reached + 1,  
true919                         &(group->maxstids), group->stids, DELTABTIDS, NOTID, "gs_static");  
 920  
group->stids <= 4095921         group->stids[group->sgroup_reached++] = tid;     /* Null Pointer Dereference */
Preconditions
size = -1
*gname != 0
strlen(gname) != 0
((char*)&$unknown_14105985)[16] >= 2
((char*)&$unknown_14105985)[44] >= ((char*)&$unknown_14105985)[52]
((char*)&$unknown_14105985)[56] != 1
Postconditions
*stderr' is allocated by fopen
bytes_before(stderr)' = 0
((char*)&$unknown_14105985)[44]' = ((char*)&$unknown_14105985)[44] + 1
((char*)&$unknown_14105985)[48]' = 0
((char*)&$unknown_14105985)[52]' = ((char*)&$unknown_14105985)[52] + 10
errno' != 0
group' = &$unknown_14105985




Change Warning 558.29353 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: