rpms/php-eaccelerator/FC-4 eaccelerator-0.9.3-buffer-overflow.patch, NONE, 1.1 php-eaccelerator.spec, 1.5, 1.6

Matthias Saou (thias) fedora-extras-commits at redhat.com
Mon Jun 27 14:23:03 UTC 2005


Author: thias

Update of /cvs/extras/rpms/php-eaccelerator/FC-4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6028/FC-4

Modified Files:
	php-eaccelerator.spec 
Added Files:
	eaccelerator-0.9.3-buffer-overflow.patch 
Log Message:
Fix buffer overflow that made the module randomly crash.


eaccelerator-0.9.3-buffer-overflow.patch:

--- NEW FILE eaccelerator-0.9.3-buffer-overflow.patch ---
diff -u eaccelerator-old/cache.c eaccelerator-0.9.3/cache.c
--- eaccelerator-old/cache.c	2005-04-26 16:47:58.000000000 +0200
+++ eaccelerator-0.9.3/cache.c	2005-06-27 13:54:13.370695656 +0200
@@ -276,7 +276,7 @@
 			if (f > 0) {
 				mm_file_header hdr;
 				EACCELERATOR_FLOCK (f, LOCK_EX);
-				strcpy (hdr.magic, "EACCELERATOR");
+				strncpy (hdr.magic, "EACCELERATOR", 8);
 				hdr.eaccelerator_version = binary_eaccelerator_version;
 				hdr.zend_version = binary_zend_version;
 				hdr.php_version = binary_php_version;
diff -u eaccelerator-old/eaccelerator.c eaccelerator-0.9.3/eaccelerator.c
--- eaccelerator-old/eaccelerator.c	2005-06-23 13:06:47.431329000 +0200
+++ eaccelerator-0.9.3/eaccelerator.c	2005-06-27 13:53:58.575944800 +0200
@@ -921,7 +921,7 @@
   f = open(s, O_CREAT | O_WRONLY | O_EXCL | O_BINARY, S_IRUSR | S_IWUSR);
   if (f > 0) {
     EACCELERATOR_FLOCK(f, LOCK_EX);
-    strcpy(hdr.magic,"EACCELERATOR");
+    strncpy(hdr.magic, "EACCELERATOR", 8);
     hdr.eaccelerator_version = binary_eaccelerator_version;
     hdr.zend_version    = binary_zend_version;
     hdr.php_version     = binary_php_version;
Common subdirectories: eaccelerator-old/eLoader and eaccelerator-0.9.3/eLoader
Common subdirectories: eaccelerator-old/win32 and eaccelerator-0.9.3/win32


Index: php-eaccelerator.spec
===================================================================
RCS file: /cvs/extras/rpms/php-eaccelerator/FC-4/php-eaccelerator.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- php-eaccelerator.spec	27 Jun 2005 09:43:26 -0000	1.5
+++ php-eaccelerator.spec	27 Jun 2005 14:23:00 -0000	1.6
@@ -6,11 +6,12 @@
 Summary: PHP accelerator, optimizer, encoder and dynamic content cacher
 Name: php-eaccelerator
 Version: %{php_version}_%{module_version}
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPL
 Group: Development/Languages
 URL: http://eaccelerator.sourceforge.net/
 Source: http://dl.sf.net/eaccelerator/eaccelerator-%{module_version}.tar.gz
+Patch: eaccelerator-0.9.3-buffer-overflow.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires: php = %{php_version}
 Provides: php-zend_extension
@@ -27,6 +28,7 @@
 
 %prep
 %setup -n eaccelerator-%{module_version}
+%patch -p1
 
 
 %build
@@ -60,6 +62,9 @@
 eaccelerator.shm_only = 0
 eaccelerator.compress = 1
 eaccelerator.compress_level = 9
+eaccelerator.keys = "shm_and_disk"
+eaccelerator.sessions = "shm_and_disk"
+eaccelerator.content = "shm_and_disk"
 eaccelerator.debug = 0
 EOF
 
@@ -78,6 +83,11 @@
 
 
 %changelog
+* Mon Jun 27 2005 Matthias Saou <http://freshrpms.net/> 4.x.x_0.9.3-3
+- Include buffer overflow patch from zoeloelip, this should fix the real
+  problem that wasn't in fact solved with the removal of _smp_mflags.
+- Add explicit shm_and_disk defaults to the ini file.
+
 * Mon Jun 27 2005 Matthias Saou <http://freshrpms.net/> 4.x.x_0.9.3-2
 - Remove %%{?_smp_mflags}, since the module crashes otherwise (#161189).
 




More information about the fedora-extras-commits mailing list