Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at cmds.c:651

Categories: LANG.MEM.NPD CWE:476
Warning ID: 505.29297
Procedure: add_cmd
Trace: view
Modified: Thu Nov 26 11:36:51 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/console/cmds.c
   Enter add_cmd
 632 add_cmd(ac, av) 
 633         int ac;
 634         char **av;
 635 {
 636         int diagnose = 0;
 637         int cc;
 638         int *sv;
 639         int i;
 640  
 641         av++;
 642         ac--;
true643         sv = TALLOC(ac, int, "int");   /* Integer Overflow of Allocation Size (ID: 506.29298) */
 644         if ((cc = pvm_addhosts(av, ac, sv)) >= 0) {
 645                 if (cc > 0)
 646                         pvm_recv(-1, HostsAddedTag); /* waste the notify message */ 
 647  
 648                 printf("%d successful\n", cc);
 649                 fputs("                    HOST     DTID\n", stdout);
 650                 for (i = 0; i < ac; i++)
sv <= 4095651                         if ((cc = sv[i]) < 0) {     /* Null Pointer Dereference */
Preconditions
ac >= 2
&$unknown_12251028 >= 1
Postconditions
ac' = ac - 1
av' = av + 4
cc' = &$unknown_12251028
diagnose' = 0
i' = 0
sv' = 0




Change Warning 505.29297 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: