Changeset 112

Show
Ignore:
Timestamp:
06/27/05 13:53:08 (3 years ago)
Author:
zoeloelip
Message:

Fixed a buffer overflow in eaccelerator.c and cache.c. A string longer

then 8 bytes was copied in a char array of length 8. This isn't a
security risk because the overflowed bytes were directly overwritten
by other values. This fixes bug 1228096 which was caused by the
bufferoverflow detection in FC4.
http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/ChangeLog

    r111 r112  
     12005-06-27 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
     2        * Fixed a buffer overflow in eaccelerator.c and cache.c. A string longer 
     3          then 8 bytes was copied in a char array of length 8. This isn't a 
     4          security risk because the overflowed bytes were directly overwritten 
     5          by other values. This fixes bug 1228096 which was caused by the  
     6          bufferoverflow detection in FC4.  
     7          http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html 
     8 
    192005-06-24 Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
    210        * The future check is removed because mtime are only checked on changes 
  • eaccelerator/trunk/cache.c

    r64 r112  
    277277                                mm_file_header hdr; 
    278278                                EACCELERATOR_FLOCK (f, LOCK_EX); 
    279                                 strcpy (hdr.magic, "EACCELERATOR"); 
     279                                strncpy (hdr.magic, "EACCELERATOR", 8); 
    280280                                hdr.eaccelerator_version = binary_eaccelerator_version; 
    281281                                hdr.zend_version = binary_zend_version; 
  • eaccelerator/trunk/eaccelerator.c

    r111 r112  
    918918  if (f > 0) { 
    919919    EACCELERATOR_FLOCK(f, LOCK_EX); 
    920     strcpy(hdr.magic,"EACCELERATOR"); 
     920    strncpy(hdr.magic, "EACCELERATOR", 8); 
    921921    hdr.eaccelerator_version = binary_eaccelerator_version; 
    922922    hdr.zend_version    = binary_zend_version;