Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Uninitialized Variable  at pvmcruft.c:646

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 2828.2889
Procedure: pvmxtoi
Trace: View
Modified: Wed Sep 2 12:49:09 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/lpvm.c
   Enter pvm_tc_conack
true1365 pvm_tc_conack(mid) 
 1366         int mid;
 1367 {
 1368         int src;                                        /* sender of reply */ 
 1369         int ttpro;                                      /* protocol revision */ 
 1370         int ackd;                                       /* connection allowed (0) */ 
 1371         struct ttpcb *pcbp;                     /* pcb for connection */ 
 1372         static int linger[2] = { 1, 60 };   /* XXX arbitrary time */ 
 1373         int i;
 1374 #ifndef NOUNIXDOM 
 1375         struct sockaddr_un uns;
 1376 #endif 
 1377         char buf[256];
 1378  
 1379         pvm_bufinfo(mid, (int *)0, (int *)0, &src);
 1380  
 1381         pvm_upkint(&ttpro, 1, 1);
 1382         pvm_upkint(&ackd, 1, 1);
 1383         pvm_upkstr(buf);
 1384  
 1385         if (pcbp = ttpcb_find(src)) {
 1386                 if (pcbp->tt_state == TTCONWAIT) {
 1387                         if (pvmdebmask & PDMROUTE) {
 1388                                 pvmlogprintf( 
 1389                                                 "pvm_tc_conack() CONACK from t%x ackd=%d\n",
 1390                                                 src, ackd );
 1391                         }
 1392                         if (ttpro != TDPROTOCOL) {   /* Uninitialized Variable (ID: 2829.2890) */
 1393                                 pvmlogprintf("pvm_tc_conack() t-t protocol mismatch with t%x\n",
 1394                                                 pcbp->tt_tid);
 1395                                 ackd = 1;
 1396  
 1397                         } else {
 1398                                 if (ackd != 0) {   /* Uninitialized Variable (ID: 2830.2891) */
 1399                                         if (pvmdebmask & PDMROUTE) {
 1400                                                 pvmlogprintf("pvm_tc_conack() route to t%x denied\n",
 1401                                                                 pcbp->tt_tid);
 1402                                         }
 1403  
 1404                                 } else {
 1405                                         if (buf[0] == '/') {
 1406 #ifdef NOUNIXDOM 
 1407                                                 pvmlogprintf(
 1408                                                 "pvm_tc_conack() CONREQ from t%x, Unix domain socket unsupported\n",
 1409                                                                 src);
 1410                                                 ackd = 1; 
 1411 #else /*NOUNIXDOM*/ 
 1412                                                 BZERO((char*)&uns, sizeof(uns));
 1413                                                 uns.sun_family = AF_UNIX;
 1414                                                 strcpy(uns.sun_path, buf);
 1415                                                 while ((i = connect(pcbp->tt_fd, (struct sockaddr*)&uns,
   ...
 1432                                                                 i |= FNDELAY; 
 1433 #endif 
 1434                                                                 (void)fcntl(pcbp->tt_fd, F_SETFL, i);
 1435                                                         }
 1436 #endif 
 1437                                                         pvm_fd_add(pcbp->tt_fd, 1);
 1438                                                 }
 1439  
 1440 #endif /*NOUNIXDOM*/ 
 1441  
 1442                                         } else {
 1443                                                 pcbp->tt_osad.sin_family = AF_INET;
buf is uninitialized1444                                                 hex_inadport(buf, &pcbp->tt_osad);
     /u1/paul/SATE/2010/c/pvm/pvm3/src/pvmcruft.c
     Enter pvm_tc_conack / hex_inadport
*$param_1 is uninitialized690   hex_inadport(s, sad) 
 691           char *s;
 692           struct sockaddr_in *sad;
 693   {
*s is uninitialized694           sad->sin_addr.s_addr = htonl((unsigned)pvmxtoi(s));   /* Null Pointer Dereference (ID: 2539.2570) */
       Enter pvm_tc_conack / hex_inadport / pvmxtoi
*$param_1 is uninitialized640     pvmxtoi(p) 
 641             char *p;
 642     {
 643             int i = 0;
 644             char c;
 645      
*p is uninitialized646             if (p[0] == '0' && (p[1] == 'x' || p[1] == 'X'))     /* Uninitialized Variable */  /* 5 more... */
       Exit pvm_tc_conack / hex_inadport / pvmxtoi
     Exit pvm_tc_conack / hex_inadport
Preconditions
&$unknown_2376418 != -1
((char*)$unknown_2376419)[20] = 1
((char*)$unknown_2376420)[16] <= &$unknown_2376423 - 1
$unknown_2376419 != &$unknown_2376420
((char*)&$unknown_2376419)[16] <= &$unknown_2376423 - 1
$unknown_2376420 != &$unknown_2376420
buf[0] != 47
pvmautoerr != 0
pvmautoerr != 2
pvmautoerr != 3
pvmtoplvl != 0
ttpro = 1318
Postconditions
((char*)$unknown_2376419)[44]' = 2
*stderr' is allocated by fopen
bytes_before(stderr)' = 0
ackd' = 0
i' = 0
mid' = $param_1
p' = &buf[0]
pcbp' = $unknown_2376419
pvm_errno' = -15
pvmmytid' = &$unknown_2376418
pvmrbuf' = 0
pvmtrc.trctid' <= 0
s' = &buf[0]
sad' = $unknown_2376419 + 44
src' = &$unknown_2376423
topvmd' = 0
ttlist' = &$unknown_2376420




Change Warning 2828.2889 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: