Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Free Null Pointer  at cmds.c:1459

Categories: ALLOC.FNP CWE:590
Warning ID: 512.29304
Procedure: delete_cmd
Trace: view
Modified: Thu Nov 26 11:36:52 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 delete_cmd
 1437 delete_cmd(ac, av) 
 1438         int ac;
 1439         char **av;
 1440 {
 1441         int cc;
 1442         int i;
 1443         int *sv;
 1444  
 1445         av++;
 1446         ac--;
true1447         sv = TALLOC(ac, int, "int");   /* Integer Overflow of Allocation Size (ID: 513.29305) */
 1448         if ((cc = pvm_delhosts(av, ac, sv)) >= 0) {
 1449                 printf("%d successful\n", cc);
 1450                 fputs("                    HOST  STATUS\n", stdout);
 1451                 for (i = 0; i < ac; i++) {
 1452                         printf("%24s  ", av[i]);
 1453                         if ((cc = sv[i]) < 0)   /* Null Pointer Dereference (ID: 511.29303) */
 1454                                 printf("%8s\n", PVMERRMSG(cc));
 1455                         else 
 1456                                 printf("deleted\n");
 1457                 }
 1458         }
sv <= 40951459         MY_FREE(sv);     /* Free Null Pointer */
Preconditions
ac <= 1
Postconditions
ac' = ac - 1
av' = av + 4
cc' >= 0
i' = 0
sv' = 0




Change Warning 512.29304 : Free Null Pointer

Priority:
State:
Finding:
Owner:
Note: