Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Buffer Overrun  at pvmcruft.c:760

Categories: LANG.MEM.BO CWE:120 CWE:121 CWE:122 CWE:126
Warning ID: 237.28874
Procedure: pvmtmpnam
Trace: view
Modified: Thu Nov 26 11:28:19 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/pvmcruft.c
   Enter pvmtmpnam
 744 char * 
 745 pvmtmpnam(buf) 
 746         char *buf;
 747 {
 748         static int f = 0;
 749         static int n = 0;
 750         static char scratch[255];
 751  
 752         char *pvmtmp;
 753  
 754         if (!buf)
 755                 buf = scratch;
 756  
$input_12 > 224757         pvmtmp = pvmgettmp();
 758  
 759 #ifndef WIN32 
strlen(pvmtmp) > bytes_after(buf) - 31760         sprintf(buf, "%s/pvmtmp%06d.%d", pvmtmp, getpid(), n);     /* Buffer Overrun */
Preconditions
buf = 0
$input_12 >= 0
td = 0
Postconditions
buf' = &scratch[0]
$heap_75321' = $input_444
bytes_after(&$heap_75321)' = $input_12 + 1
$heap_75321' is allocated by malloc
$heap_75321' is a non-heap object
bytes_before(&$heap_75321)' = 0
strlen(&$heap_75321)' = $input_12
pvmtmp' = &$heap_75321
td' = &$heap_75321




Change Warning 237.28874 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: