Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at hoster.c:388

Categories: LANG.MEM.NPD CWE:476
Warning ID: 22041.28702
Procedure: hoster
Trace: view
Modified: Thu Nov 26 11:27: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
   /kat0/fletcher/SATE/2010/pvm3/src/hoster.c
   Enter hoster
 348 hoster(mp) 
 349         struct pmsg *mp;
 350 {
 351         struct pmsg *mp2;
 352         int num;
 353         int i;
 354         struct hst **hostlist;
 355         struct hst *hp;
 356         char *p;
 357  
 358         /*
 359         * unpack the startup message 
 360         */ 
 361  
 362         upkint(mp, &num);
 363         if (pvmdebmask & PDMSTARTUP) {
 364                 pvmlogprintf("hoster() %d to start\n", num);
 365         }
 366         if (num > 0) {
 367                 hostlist = TALLOC(num, struct hst *, "hsts");   /* Integer Overflow of Allocation Size (ID: 104.28706) */
 368                 for (i = 0; i < num; i++) {
 369                         hp = TALLOC(1, struct hst, "hst");
 370                         hostlist[i] = hp;   /* Null Pointer Dereference (ID: 103.28705) */
 371                         hp->h_flag = 0;   /* Null Pointer Dereference (ID: 102.28704) */
 372                         hp->h_result = 0;
 373                         if (upkint(mp, &hp->h_tid) 
 374                         || upkstralloc(mp, &hp->h_sopts) 
 375                         || upkstralloc(mp, &hp->) 
 376                         || upkstralloc(mp, &hp->h_cmd) 
 377                         || upkstralloc(mp, &hp->h_wincmd) 
true378                         || upkstralloc(mp, &hp->h_vmid)) {
 379                                 pvmlogerror("hoster() bad message format\n");
 380                                 pvmbailout(0);
 381                         }
 382                         /* Check for (possible) alternate WIN32 pvmd cmd */ 
 383                         if (!strcmp(hp->h_wincmd,"")) {   /* Null Pointer Dereference (ID: 22042.28703) */
 384                                 PVM_FREE(hp->h_wincmd);
 385                                 hp->h_wincmd = 0;
 386                         }
 387                         /* Check for (optional) virtual machine ID */ 
hp->h_vmid <= 4095388                         if (!strcmp(hp->h_vmid,"")) {     /* Null Pointer Dereference */
Preconditions
&$unknown_271697 >= 1
&$unknown_271699 >= 1
&$unknown_271703 >= 1
&$unknown_271706 >= 1
$heap_11924 = 0
strlen(&$heap_11924) = 0
Postconditions
atnewline' = 0
errno' != 0
$heap_11921' = &$heap_11922
bytes_after(&$heap_11921)' = 4 * &$unknown_271697
$heap_11921' is allocated by malloc
$heap_11921' is allocated
bytes_before(&$heap_11921)' = 0
bytes_after(&$heap_11922)' = 36
$heap_11922' is allocated by malloc
bytes_before(&$heap_11922)' = 0
((char*)&$heap_11922)[16]' = 0
((char*)&$heap_11922)[20]' = 0
((char*)&$heap_11922)[24]' = 0
((char*)&$heap_11922)[28]' = 0
((char*)&$heap_11922)[32]' = 0
((char*)&$heap_11922)[8]' = 0
((char*)&$heap_11922)[12]' = &$heap_11923
bytes_after(&$heap_11923)' = &$unknown_271699
$heap_11923' is allocated by malloc
bytes_before(&$heap_11923)' = 0
bytes_after(&$heap_11924)' = &$unknown_271703
$heap_11924' is allocated by malloc
$heap_11924' is freed
bytes_before(&$heap_11924)' = 0
hostlist' = &$heap_11921
hp' = &$heap_11922
i' = 0
num' = &$unknown_271697
tmbuf.tm_sec' = &$unknown_271696




Change Warning 22041.28702 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: