php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch without-safe_mode-compiling-for-php5.4 for crack Bug #58779

Patch version 2012-05-15 20:30 UTC

Return to Bug #58779 | Download this patch
Patch Revisions:

Developer: jlladono@gmail.com

diff -crB crack-0.4/crack.c crack-0.4.1/crack.c
*** crack-0.4/crack.c	2005-09-21 11:00:06.000000000 +0200
--- crack-0.4.1/crack.c	2012-05-15 22:11:08.000000000 +0200
***************
*** 38,44 ****
  
  /* {{{ crack_functions[]
   */
! function_entry crack_functions[] = {
  	PHP_FE(crack_opendict,			NULL)
  	PHP_FE(crack_closedict,			NULL)
  	PHP_FE(crack_check,				NULL)
--- 38,44 ----
  
  /* {{{ crack_functions[]
   */
! zend_function_entry crack_functions[] = {
  	PHP_FE(crack_opendict,			NULL)
  	PHP_FE(crack_closedict,			NULL)
  	PHP_FE(crack_check,				NULL)
***************
*** 95,101 ****
  	char *filename;
  	int filename_len;
  	int result = SUCCESS;
! 	
  	if (PG(safe_mode)) {
  		filename_len = strlen(path) + 10;
  		filename = (char *) emalloc(filename_len);
--- 95,101 ----
  	char *filename;
  	int filename_len;
  	int result = SUCCESS;
! #if PHP_VERSION_ID < 50400 /* valid only prior to PHP 5.4 as safe_mode has been removed  */
  	if (PG(safe_mode)) {
  		filename_len = strlen(path) + 10;
  		filename = (char *) emalloc(filename_len);
***************
*** 127,133 ****
  			return FAILURE;
  		}
  	}
! 	
  	if (php_check_open_basedir(path TSRMLS_CC)) {
  		return FAILURE;
  	}
--- 127,133 ----
  			return FAILURE;
  		}
  	}
! #endif 	 /* code prior to PHP 5.4 */
  	if (php_check_open_basedir(path TSRMLS_CC)) {
  		return FAILURE;
  	}
Només a crack-0.4.1: crack.c~
diff -crB crack-0.4/libcrack/src/config.h crack-0.4.1/libcrack/src/config.h
*** crack-0.4/libcrack/src/config.h	2005-09-21 11:00:06.000000000 +0200
--- crack-0.4.1/libcrack/src/config.h	2012-05-11 23:01:48.000000000 +0200
***************
*** 1,4 ****
! #include "../../config.h"
  #if ZTS
  # define THREADSAFE 1
  #endif
--- 1,4 ----
! #include "../config.h"
  #if ZTS
  # define THREADSAFE 1
  #endif
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 05:01:33 2024 UTC