Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Buffer Overrun  at pvmlog.c:332

Categories: LANG.MEM.BO CWE:120 CWE:121 CWE:122 CWE:126
Warning ID: 258.28895
Procedure: pvmsetlog
Trace: view
Modified: Thu Nov 26 11:28:24 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/pvmlog.c
   Enter pvmsetlog
 294 pvmsetlog(how) 
 295         int how;
 296 {
 297         char buf[255];
 298         char hna[128];
 299         char *pvmtmp;
 300         char *p;
 301  
 302 #ifdef  IMA_CSPP 
 303         int scid = get_scid();  /* default (system) subcomplex ID is 1) */ 
 304                                         /* differentiate logfile when not on system s/c */ 
 305 #endif 
 306  
 307         if (2 & how & ~log_how) {
$input_12 > 237308                 pvmtmp = pvmgettmp();
 309 #ifdef  SHAREDTMP 
 310                 if (gethostname(hna, sizeof(hna)-1) == -1) {
 311                         pvmlogerror("pvmsetlog() can't gethostname()\n");
 312                         return 0;
 313                 }
 314                 if (p = CINDEX(hna, '.'))
 315                         *p = 0;
 316 #ifdef  IMA_CSPP 
 317                 if (scid > 1)
 318                         (void)sprintf(buf, PVMDLOGFILE_CSPP,
   ...
 322                         (void)sprintf(buf, PVMDLOGFILE, pvmtmp, pvm_useruid, hna); 
 323  
 324 #else   /*SHAREDTMP*/ 
 325 #ifdef  IMA_CSPP 
 326                 if (scid > 1)
 327                         (void)sprintf(buf, PVMDLOGFILE_CSPP,
 328                                         pvmtmp, pvm_useruid, scid);
 329                 else 
 330 #endif 
 331 #ifndef WIN32 
strlen(pvmtmp) > 237332                 (void)sprintf(buf, PVMDLOGFILE, pvmtmp, pvm_useruid);     /* Buffer Overrun */
Preconditions
$input_12 >= 0
td = 0
Postconditions
$heap_82696' = $input_444
bytes_after(&$heap_82696)' = $input_12 + 1
$heap_82696' is allocated by malloc
$heap_82696' is a non-heap object
bytes_before(&$heap_82696)' = 0
strlen(&$heap_82696)' = $input_12
pvmtmp' = &$heap_82696
td' = &$heap_82696




Change Warning 258.28895 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: