Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at pvmgsu_core.c:697

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2942.3025
Procedure: gs_get_tidlist
Trace: View
Modified: Wed Sep 2 12:53:30 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/pvmgsu_core.c
   Enter gs_get_tidlist
 659 gs_get_tidlist(group, msgtag, ntids, tids, holes_not_allowed) 
 660 char *group;
 661 int msgtag;
 662 int *ntids;  
 663 int **tids;  
 664 int holes_not_allowed;
 665 {
 666         int cc;
 667         int i;
 668         int len;
 669         int rbuf;
 670         int sbuf, state, stid;
 671         int savectx;
 672  
 673         GROUP_STRUCT_PTR sgroup;
 674  
 675         if ( group == (char*)0 || *group == '\0' )  
 676                 return(PvmNullGroup);
 677  
 678         /* look up to see if the information is held locally               */ 
 679  
 680         sgroup = gs_group(group, sgroup_list, &ngroups, NOCREATE);
 681  
 682         if (sgroup != (GROUP_STRUCT_PTR) NULL)  
 683         {
 684                 if (holes_not_allowed)  
 685                 {
 686                         for (i=0; i < sgroup->ntids; i++)
 687                                 if (sgroup->tids[i] == NOTID)
 688                                 {
 689                                         *ntids = -1;
 690                                         return (*ntids);
 691                                 }
 692                 }
 693  
true694                 *tids = (int *) PVM_ALLOC(sgroup->maxntids*sizeof(int),"tidlist");  
 695  
 696                 for (i = 0; i < sgroup->maxntids; i++)
*tids <= 4095697                         (*tids)[i] = sgroup->tids[i];     /* Null Pointer Dereference */
Preconditions
$param_5 != 0
((char*)&((char*)((char*)$unknown_3459670)[8])[16])[24] >= 1
((char*)&((char*)((char*)$unknown_3459670)[8])[16])[12] >= 2
*$param_1 != 0
strlen($param_1) > 0
Postconditions
group' = $param_1
holes_not_allowed' = $param_5
i' = 0
msgtag' = $param_2
ntids' = $param_3
sgroup' = ((char*)&((char*)$unknown_3459670)[8])[16]
tids' = $param_4




Change Warning 2942.3025 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: