Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Null Pointer Dereference  at hoster.c:427

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2508.2538
Procedure: hoster
Trace: View
Modified: Wed Sep 2 12:39:57 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/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");
 368                 for (i = 0; i < num; i++) {
 369                         hp = TALLOC(1, struct hst, "hst");
 370                         hostlist[i] = hp;   /* Null Pointer Dereference (ID: 2507.2537) */
 371                         hp->h_flag = 0;   /* Null Pointer Dereference (ID: 2506.2536) */
 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) 
   ...
 410                                 hp->h_flag |= HST_PASSWORD;
 411                         if (!strcmp(hp->h_sopts, "ms"))
 412                                 hp->h_flag |= HST_MANUAL;
 413                 }
 414         }
 415  
 416         /*
 417         * do it 
 418         */ 
 419  
 420         pl_startup(num, hostlist);   /* Uninitialized Variable (ID: 2509.2539) */
 421  
 422         /*
 423         * send results back to pvmd 
 424         */ 
 425  
true426         mp2 = mesg_new(0);
mp2 <= 4095427         mp2->m_dst = mp->m_src;     /* Null Pointer Dereference */
Preconditions
numpmsgs = 0
Postconditions
atnewline' = 1
errno' != 0
freepmsgs.m_link' = &freepmsgs.m_link
freepmsgs.m_rlink' = &freepmsgs.m_link
mp' = $param_1
mp2' = 0
slfree' = &slots[0].s_link + 3456
slots[5].s_link' = &slots[0].s_link + 2880
slots[5].s_rlink' = &slots[0].s_link + 2880
slots[6].s_link' != &slots[0].s_link + 3456
tmbuf.tm_sec' = &$unknown_264515




Change Warning 2508.2538 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: