Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at pvmgs_func.c:921

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2957.3040
Procedure: gs_static
Trace: View
Modified: Wed Sep 2 12:54:50 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
   /u1/paul/SATE/2010/c/pvm/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')   /* Uninitialized Variable (ID: 2961.3044) */
 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;
true909                 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,  
group->sgroup_reached < 1024919                         &(group->maxstids), group->stids, DELTABTIDS, NOTID, "gs_static");  
 920  
group->stids <= 4095921         group->stids[group->sgroup_reached++] = tid;     /* Null Pointer Dereference */
Preconditions
$param_2 = -1
$param_4 >= 1816
((char*)$param_1)[1] = 0
((char*)&((char*)((char*)*$param_4)[2288])[16])[24] >= 2
((char*)&((char*)((char*)*$param_4)[2288])[16])[52] = -1
((char*)&((char*)((char*)*$param_4)[2288])[16])[72] <= 0
((char*)&((char*)((char*)*$param_4)[2288])[16])[72] >= -10
((char*)&((char*)((char*)*$param_4)[2288])[16])[76] != 1
((char*)&((char*)((char*)*$param_4)[2288])[16])[8] >= 2
*$param_1 >= 127
strlen($param_1) = 1
strlen(((char*)((char*)*$param_4)[2288])[16]) = 1
Postconditions
codesonar_distance_tweak' = 2
gname' = $param_1
group' = ((char*)&((char*)*$param_4)[2288])[16]
hash_list' = $param_4
ngroups' = $param_5
size' = ((char*)&((char*)((char*)*$param_4)[2288])[16])[12]
tid' = $param_3




Change Warning 2957.3040 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: