Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Buffer Overrun  at tracer.c:487

Categories: LANG.MEM.BO CWE:120 CWE:121 CWE:122 CWE:126
Warning ID: 455.29214
Procedure: program_init
Trace: view
Modified: Thu Nov 26 11:36:10 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/tracer/tracer.c
   Enter program_init
 455 program_init() 
 456 {
 457         struct passwd *pw;
 458  
 459         char hname[1024];
 460         char pvstr[255];
 461         char tmp[2048];
 462  
 463 #ifdef WIN32 
 464         char *username = 0;
 465         char *pstr; 
   ...
 471         char *home;
 472  
 473         int entry_exit;
 474         int release;
 475         int version;
 476         int fmt;
 477         int i;
 478  
 479         /* Get User Name for Trace File */ 
 480  
 481         if ( TRACE_FILE == NULL )
 482         {
$input_12 > 2036483                 pvmtmp = pvmgettmp();
 484  
 485 #ifndef WIN32 
 486                 if ( (pw = getpwuid( getuid() )) != NULL )
strlen(pvmtmp) > 2036487                         sprintf( tmp, "%s/tracefile.%s", pvmtmp, pw->pw_name );     /* Buffer Overrun */
Preconditions
TRACE_FILE = 0
$input_12 >= 0
td = 0
Postconditions
$heap_431642' = $input_444
bytes_after(&$heap_431642)' = $input_12 + 1
$heap_431642' is allocated by malloc
$heap_431642' is a non-heap object
bytes_before(&$heap_431642)' = 0
strlen(&$heap_431642)' = $input_12
pvmtmp' = &$heap_431642
pw' = &stored_passwd.pw_name
td' = &$heap_431642




Change Warning 455.29214 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: