Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Uninitialized Variable  at lpvm.c:1414

Categories: LANG.MEM.UVAR CWE:457
Warning ID: 407.29120
Procedure: pvm_tc_conack
Trace: view
Modified: Thu Nov 26 11:34:31 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/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)) {   /* Uninitialized Variable (ID: 22140.29125) */
 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 );   /* Uninitialized Variable (ID: 22139.29124) */
 1391                         }
 1392                         if (ttpro != TDPROTOCOL) {   /* Uninitialized Variable (ID: 22137.29122) */
 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: 22138.29123) */
 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;
buf is uninitialized1414                                                 strcpy(uns.sun_path, buf);     /* Uninitialized Variable */
Preconditions
&$unknown_10837588 = *$unknown_10837588
((char*)*$unknown_10837588)[12] = 1
((char*)$unknown_10837588)[8] <= ((char*)*$unknown_10837588)[8] - 1
$unknown_10837588 != *$unknown_10837588
buf[0] = 47
strlen(&buf[0]) != 0
pvmautoerr = 0
pvmtoplvl = 0
Postconditions
*stderr' is allocated by fopen
bytes_before(stderr)' = 0
ackd' = 0
errno' != 0
newline' = 1
pcbp' = *$unknown_10837588
pvm_errno' = -15
pvmrbuf' = 0
src' = ((char*)*$unknown_10837588)[8]
ttlist' = &$unknown_10837588
ttpro' = 1318
uns.sun_family' = 1
tocttou(uns.sun_path)' = tocttou(buf)




Change Warning 407.29120 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: