Show
Ignore:
Timestamp:
06/27/05 13:53:08 (4 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/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;