[PHP-CVS] svn: /php/php-src/trunk/main/ output.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 08:20:12 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291864

Log:
- No tabs here

Changed paths:
U   php/php-src/trunk/main/output.c

Modified: php/php-src/trunk/main/output.c
===
--- php/php-src/trunk/main/output.c 2009-12-08 06:58:10 UTC (rev 291863)
+++ php/php-src/trunk/main/output.c 2009-12-08 08:20:12 UTC (rev 291864)
@@ -22,10 +22,10 @@
 /* $Id$ */

 #ifndef PHP_OUTPUT_DEBUG
-#  define PHP_OUTPUT_DEBUG 0
+# define PHP_OUTPUT_DEBUG 0
 #endif
 #ifndef PHP_OUTPUT_NOINLINE
-#  define PHP_OUTPUT_NOINLINE 0
+# define PHP_OUTPUT_NOINLINE 0
 #endif

 #include php.h
@@ -38,8 +38,8 @@
 ZEND_DECLARE_MODULE_GLOBALS(output);

 #if PHP_OUTPUT_NOINLINE || PHP_OUTPUT_DEBUG
-#  undef   inline
-#  define  inline
+# undef inline
+# define inline
 #endif

 /* {{{ aliases, conflict and reverse conflict hash tables */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 08:21:25 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291865

Log:
MF52: Fixed memory leak on require() error (Thanks again Ilia. r220154)

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-08 08:20:12 UTC (rev 291864)
+++ php/php-src/trunk/main/main.c   2009-12-08 08:21:25 UTC (rev 291865)
@@ -883,8 +883,6 @@
if (docref_buf) {
efree(docref_buf);
}
-   php_error(type, %s, message);
-   efree(message);

if (PG(track_errors)  module_initialized 
(!EG(user_error_handler) || 
!(EG(user_error_handler_error_reporting)  type))) {
@@ -899,6 +897,9 @@
}
}
efree(buffer);
+
+   php_error(type, %s, message);
+   efree(message);
 }
 /* }}} */


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 08:21:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291866

Log:
- ws

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-08 08:21:25 UTC (rev 291865)
+++ php/php-src/trunk/main/main.c   2009-12-08 08:21:56 UTC (rev 291866)
@@ -284,17 +284,17 @@
 /* }}} */

 #define PHP_INI_OPTION_HEADERS_SENT(option_name)   

 \
-   if (SG(headers_sent)) { 

\
-   char *output_start_filename = 
php_output_get_start_filename(TSRMLS_C);
  \
-   int output_start_lineno = 
php_output_get_start_lineno(TSRMLS_C);  
  \
-   if (output_start_filename) {

\
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Option  #option_name  cannot be changed after headers have been sent (output 
started at %s:%d), \
-   

output_start_filename, output_start_lineno);
\
-   } else {

\
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Option  #option_name  cannot be changed after headers have been sent);  
\
-   }   

\
-   return FAILURE; 

\
-   }
+   if (SG(headers_sent)) { 

\
+   char *output_start_filename = 
php_output_get_start_filename(TSRMLS_C);
  \
+   int output_start_lineno = 
php_output_get_start_lineno(TSRMLS_C);  
  \
+   if (output_start_filename) {

\
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Option  
#option_name  cannot be changed after headers have been sent (output started 
at %s:%d), \
+   

output_start_filename, output_start_lineno);\
+   } else {

\
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Option  
#option_name  cannot be changed after headers have been sent);
  \
+   }   

\
+   return FAILURE; 

\
+   }

 /* {{{ PHP_INI_MH
  */
@@ -570,7 +570,7 @@
STD_PHP_INI_ENTRY(auto_prepend_file,  NULL,   
PHP_INI_SYSTEM|PHP_INI_PERDIR,  OnUpdateString, 
auto_prepend_file,  php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(doc_root,   NULL,   
PHP_INI_SYSTEM, OnUpdateStringUnempty,  doc_root,   
php_core_globals,   core_globals)
STD_PHP_INI_ENTRY(default_charset,SAPI_DEFAULT_CHARSET,   
PHP_INI_ALL,OnUpdateDefaultCharset, default_charset,
sapi_globals_struct,sapi_globals)
-   STD_PHP_INI_ENTRY(default_mimetype,   

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 08:34:53 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291867

Log:
No tabs here

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-08 08:21:56 UTC (rev 291866)
+++ php/php-src/trunk/main/main.c   2009-12-08 08:34:53 UTC (rev 291867)
@@ -1352,11 +1352,11 @@

snprintf(memory_leak_buf, 512, Last 
leak repeated %ld time%s\n, leak_count, (leak_count1?s:));
}
-#  if defined(PHP_WIN32)
+# if defined(PHP_WIN32)
OutputDebugString(memory_leak_buf);
-#  else
+# else
fprintf(stderr, %s, memory_leak_buf);
-#  endif
+# endif
}
 #endif
break;
@@ -1366,11 +1366,11 @@
char memory_leak_buf[512];

snprintf(memory_leak_buf, 512, === Total %d 
memory leaks detected ===\n, *((zend_uint *) data));
-#  if defined(PHP_WIN32)
+# if defined(PHP_WIN32)
OutputDebugString(memory_leak_buf);
-#  else
+# else
fprintf(stderr, %s, memory_leak_buf);
-#  endif
+# endif
}
 #endif
break;
@@ -1389,11 +1389,11 @@
} else {
snprintf(memory_leak_buf, 
sizeof(memory_leak_buf), [null]  Script:  '%s'\n, 
SAFE_FILENAME(SG(request_info).path_translated));
}
-#  if defined(PHP_WIN32)
+#if defined(PHP_WIN32)
OutputDebugString(memory_leak_buf);
-#  else
+# else
fprintf(stderr, %s, memory_leak_buf);
-#  endif
+#endif
}
break;
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/ fastcgi.c

2009-12-08 Thread Antony Dovgal
tony2001 Tue, 08 Dec 2009 10:15:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291869

Log:
add missing includes, fix compile warnings

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c 2009-12-08 
09:29:30 UTC (rev 291868)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/fpm/fastcgi.c 2009-12-08 
10:15:11 UTC (rev 291869)
@@ -27,6 +27,14 @@
 #include stdarg.h
 #include errno.h

+#ifdef FPM_AUTOCONFIG_H
+#include fpm_autoconfig.h
+#else
+#include php_config.h
+#endif
+#include fpm/fpm.h
+#include fpm/fpm_request.h
+
 #ifdef _WIN32

 #include windows.h

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/sapi/fpm/ Makefile.frag config.m4

2009-12-08 Thread Antony Dovgal
tony2001 Tue, 08 Dec 2009 10:15:59 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291870

Log:
fix build without --prefix and make sure fpm_conf is recompiled every
time one changes --prefix

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag
U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag 2009-12-08 
10:15:11 UTC (rev 291869)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag 2009-12-08 
10:15:59 UTC (rev 291870)
@@ -3,6 +3,8 @@
 $(SAPI_FPM_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(SAPI_EXTRA_DEPS)
$(BUILD_FPM)

+$(builddir)/fpm/fpm_conf.lo: $(builddir)/../../main/build-defs.h
+
 install-build: install-fpm

 install-fpm: install-sapi

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4
===
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-08 10:15:11 UTC 
(rev 291869)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-08 10:15:59 UTC 
(rev 291870)
@@ -534,6 +534,10 @@
 php_fpm_conf_path=$PHP_FPM_CONF
   fi

+  if test -z $prefix -o $prefix = NONE; then
+prefix=/usr/local
+  fi
+
   if test -z $php_fpm_conf_path; then
 php_fpm_conf_path=`eval echo $sysconfdir`
 php_fpm_conf_path=$php_fpm_conf_path/php-fpm.conf
@@ -636,7 +640,7 @@
   AC_FPM_CHECKS
   AC_FPM_CONF

-  PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/fpm/Makefile.frag)
+  PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag], 
[$abs_srcdir/sapi/fpm], [sapi/fpm])

   SAPI_FPM_PATH=sapi/fpm/php-fpm
   PHP_SUBST(SAPI_FPM_PATH)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/main/main.c branches/PHP_5_3/main/main.c trunk/main/main.c

2009-12-08 Thread Dmitry Stogov
dmitry   Tue, 08 Dec 2009 10:16:38 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291871

Log:
- Forgotten patch for trunk
- Fixed stdin filename in error messages

Changed paths:
U   php/php-src/branches/PHP_5_2/main/main.c
U   php/php-src/branches/PHP_5_3/main/main.c
U   php/php-src/trunk/main/main.c

Modified: php/php-src/branches/PHP_5_2/main/main.c
===
--- php/php-src/branches/PHP_5_2/main/main.c2009-12-08 10:15:59 UTC (rev 
291870)
+++ php/php-src/branches/PHP_5_2/main/main.c2009-12-08 10:16:38 UTC (rev 
291871)
@@ -1994,6 +1994,7 @@
 *   otherwise it will get opened and added to the 
included_files list in zend_execute_scripts
 */
if (primary_file-filename 
+   (primary_file-filename[0] != '-' || 
primary_file-filename[1] != 0) 
primary_file-opened_path == NULL 
primary_file-type != ZEND_HANDLE_FILENAME
) {

Modified: php/php-src/branches/PHP_5_3/main/main.c
===
--- php/php-src/branches/PHP_5_3/main/main.c2009-12-08 10:15:59 UTC (rev 
291870)
+++ php/php-src/branches/PHP_5_3/main/main.c2009-12-08 10:16:38 UTC (rev 
291871)
@@ -2191,6 +2191,7 @@
 *   otherwise it will get opened and added to the 
included_files list in zend_execute_scripts
 */
if (primary_file-filename 
+   (primary_file-filename[0] != '-' || 
primary_file-filename[1] != 0) 
primary_file-opened_path == NULL 
primary_file-type != ZEND_HANDLE_FILENAME
) {

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-08 10:15:59 UTC (rev 291870)
+++ php/php-src/trunk/main/main.c   2009-12-08 10:16:38 UTC (rev 291871)
@@ -2311,12 +2311,14 @@
 *   otherwise it will get opened and added to the 
included_files list in zend_execute_scripts
 */
if (primary_file-filename 
+   (primary_file-filename[0] != '-' || 
primary_file-filename[1] != 0) 
primary_file-opened_path == NULL 
primary_file-type != ZEND_HANDLE_FILENAME
) {
int realfile_len;
int dummy = 1;
-   if (VCWD_REALPATH(primary_file-filename, realfile)) {
+
+   if (expand_filepath(primary_file-filename, realfile 
TSRMLS_CC)) {
realfile_len =  strlen(realfile);
zend_hash_add(EG(included_files), realfile, 
realfile_len+1, (void *)dummy, sizeof(int), NULL);
primary_file-opened_path = estrndup(realfile, 
realfile_len);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/zlib/ php_zlib.h zlib.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 10:56:41 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291872

Log:
ws

Changed paths:
U   php/php-src/trunk/ext/zlib/php_zlib.h
U   php/php-src/trunk/ext/zlib/zlib.c

Modified: php/php-src/trunk/ext/zlib/php_zlib.h
===
--- php/php-src/trunk/ext/zlib/php_zlib.h	2009-12-08 10:16:38 UTC (rev 291871)
+++ php/php-src/trunk/ext/zlib/php_zlib.h	2009-12-08 10:56:41 UTC (rev 291872)
@@ -64,9 +64,9 @@
 #define phpext_zlib_ptr zlib_module_ptr

 #ifdef ZTS
-#	define ZLIBG(v) TSRMG(zlib_globals_id, zend_zlib_globals *, v)
+# define ZLIBG(v) TSRMG(zlib_globals_id, zend_zlib_globals *, v)
 #else
-#	define ZLIBG(v) (zlib_globals.v)
+# define ZLIBG(v) (zlib_globals.v)
 #endif

 #endif /* PHP_ZLIB_H */

Modified: php/php-src/trunk/ext/zlib/zlib.c
===
--- php/php-src/trunk/ext/zlib/zlib.c	2009-12-08 10:16:38 UTC (rev 291871)
+++ php/php-src/trunk/ext/zlib/zlib.c	2009-12-08 10:56:41 UTC (rev 291872)
@@ -23,7 +23,7 @@
 /* $Id$ */

 #ifdef HAVE_CONFIG_H
-#	include config.h
+# include config.h
 #endif

 #include php.h
@@ -66,10 +66,10 @@
 static int php_zlib_output_encoding(TSRMLS_D)
 {
 	zval **enc;
-
+
 	if (!ZLIBG(compression_coding)) {
 		zend_is_auto_global(ZEND_STRL(_SERVER) TSRMLS_CC);
-
+
 		if (PG(http_globals)[TRACK_VARS_SERVER]  SUCCESS == zend_hash_find(Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]), HTTP_ACCEPT_ENCODING, sizeof(HTTP_ACCEPT_ENCODING), (void *) enc)) {
 			convert_to_string(*enc);
 			if (strstr(Z_STRVAL_PP(enc), gzip)) {
@@ -79,7 +79,6 @@
 			}
 		}
 	}
-
 	return ZLIBG(compression_coding);
 }
 /* }}} */
@@ -90,12 +89,12 @@
 	php_zlib_context *ctx = *(php_zlib_context **) handler_context;
 	int flags = Z_SYNC_FLUSH;
 	PHP_OUTPUT_TSRMLS(output_context);
-
+
 	if (!php_zlib_output_encoding(TSRMLS_C)) {
 		/* Vary: Accept-Encoding header sent along uncompressed content breaks caching in MSIE,
 			so let's just send it with successfully compressed content or unless the complete
 			buffer gets discarded, see http://bugs.php.net/40325;
-
+
 			Test as follows:
 			+Vary: $ HTTP_ACCEPT_ENCODING=gzip ./sapi/cgi/php '?php ob_start(ob_gzhandler); echo foo\n;'
 			+Vary: $ HTTP_ACCEPT_ENCODING= ./sapi/cgi/php '?php ob_start(ob_gzhandler); echo foo\n;'
@@ -107,18 +106,18 @@
 		}
 		return FAILURE;
 	}
-
+
 	if (output_context-op  PHP_OUTPUT_HANDLER_START) {
 		/* start up */
 		if (Z_OK != deflateInit2(ctx-Z, ZLIBG(output_compression_level), Z_DEFLATED, ZLIBG(compression_coding), MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY)) {
 			return FAILURE;
 		}
 	}
-
+
 	if (output_context-op  PHP_OUTPUT_HANDLER_CLEAN) {
 		/* free buffers */
 		deflateEnd(ctx-Z);
-
+
 		if (output_context-op  PHP_OUTPUT_HANDLER_FINAL) {
 			/* discard */
 			return SUCCESS;
@@ -130,7 +129,6 @@
 			ctx-buffer.used = 0;
 		}
 	} else {
-
 		if (output_context-in.used) {
 			/* append input */
 			if (ctx-buffer.free  output_context-in.used) {
@@ -145,23 +143,22 @@
 			ctx-buffer.free -= output_context-in.used;
 			ctx-buffer.used += output_context-in.used;
 		}
-
 		output_context-out.size = PHP_ZLIB_BUFFER_SIZE_GUESS(output_context-in.used);
 		output_context-out.data = emalloc(output_context-out.size);
 		output_context-out.free = 1;
 		output_context-out.used = 0;
-
+
 		ctx-Z.avail_in = ctx-buffer.used;
 		ctx-Z.next_in = (Bytef *) ctx-buffer.data;
 		ctx-Z.avail_out = output_context-out.size;
 		ctx-Z.next_out = (Bytef *) output_context-out.data;
-
+
 		if (output_context-op  PHP_OUTPUT_HANDLER_FINAL) {
 			flags = Z_FINISH;
 		} else if (output_context-op  PHP_OUTPUT_HANDLER_FLUSH) {
 			flags = Z_FULL_FLUSH;
 		}
-
+
 		switch (deflate(ctx-Z, flags)) {
 			case Z_OK:
 if (flags == Z_FINISH) {
@@ -180,9 +177,9 @@
 deflateEnd(ctx-Z);
 return FAILURE;
 		}
-
+
 		php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_GET_FLAGS, flags TSRMLS_CC);
-
+
 		if (!(flags  PHP_OUTPUT_HANDLER_STARTED)) {
 			if (SG(headers_sent) || !ZLIBG(output_compression)) {
 deflateEnd(ctx-Z);
@@ -202,7 +199,7 @@
 			sapi_add_header_ex(ZEND_STRL(Vary: Accept-Encoding), 1, 1 TSRMLS_CC);
 			php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE, NULL TSRMLS_CC);
 		}
-
+
 		if (output_context-op  PHP_OUTPUT_HANDLER_FINAL) {
 			deflateEnd(ctx-Z);
 		}
@@ -215,7 +212,7 @@
 static void php_zlib_output_handler_dtor(void *opaq TSRMLS_DC)
 {
 	php_zlib_context *ctx = (php_zlib_context *) opaq;
-
+
 	if (ctx) {
 		if (ctx-buffer.data) {
 			efree(ctx-buffer.data);
@@ -230,7 +227,7 @@
 {
 	php_output_handler *h = NULL;
 	php_zlib_context   *ctx;
-
+
 	if (!ZLIBG(output_compression)) {
 		ZLIBG(output_compression) = chunk_size ? chunk_size : PHP_OUTPUT_HANDLER_DEFAULT_SIZE;
 	}
@@ -240,7 +237,7 @@
 		ctx-Z.zfree = php_zlib_free;
 		php_output_handler_set_context(h, ctx, php_zlib_output_handler_dtor TSRMLS_CC);
 	}
-
+
 	return h;
 }
 /* }}} */
@@ 

[PHP-CVS] svn: /php/php-src/trunk/main/ main.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 11:00:03 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291873

Log:
- Fix the comment again

Changed paths:
U   php/php-src/trunk/main/main.c

Modified: php/php-src/trunk/main/main.c
===
--- php/php-src/trunk/main/main.c   2009-12-08 10:56:41 UTC (rev 291872)
+++ php/php-src/trunk/main/main.c   2009-12-08 11:00:03 UTC (rev 291873)
@@ -1675,7 +1675,7 @@
php_output_deactivate(TSRMLS_C);
} zend_end_try();

-   /* 4. Send the set HTTP headers (note: This must be done AFTER 
php_end_ob_buffers() !!) */
+   /* 4. Send the set HTTP headers (note: This must be done AFTER 
php_output_discard_all() / php_output_end_all() !!) */
zend_try {
sapi_send_headers(TSRMLS_C);
} zend_end_try();

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/iconv/ iconv.c

2009-12-08 Thread Antony Dovgal
tony2001 Tue, 08 Dec 2009 12:12:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291874

Log:
sync with 5_3

Changed paths:
U   php/php-src/trunk/ext/iconv/iconv.c

Modified: php/php-src/trunk/ext/iconv/iconv.c
===
--- php/php-src/trunk/ext/iconv/iconv.c 2009-12-08 11:00:03 UTC (rev 291873)
+++ php/php-src/trunk/ext/iconv/iconv.c 2009-12-08 12:12:23 UTC (rev 291874)
@@ -740,36 +740,39 @@
if (err != PHP_ICONV_ERR_SUCCESS) {
return err;
}
-
-   /* normalize the offset and the length */
-   if (offset  0) {
-   if ((offset += total_len)  0) {
-   offset = 0;
-   }
-   }
+
if (len  0) {
if ((len += (total_len - offset))  0) {
-   len = 0;
+   return PHP_ICONV_ERR_SUCCESS;
}
}

-   if((unsigned int) len  total_len) {
+   if (offset  0) {
+   if ((offset += total_len)  0) {
+   return PHP_ICONV_ERR_SUCCESS;
+   }
+   }
+
+   if(len  total_len) {
len = total_len;
}

-   if ((unsigned int) offset = total_len) {
+
+   if (offset = total_len) {
return PHP_ICONV_ERR_SUCCESS;
}

-   if ((unsigned int) (offset + len)  total_len) {
+   if ((offset + len)  total_len ) {
/* trying to compute the length */
len = total_len - offset;
}

if (len == 0) {
+   smart_str_appendl(pretval, , 0);
+   smart_str_0(pretval);
return PHP_ICONV_ERR_SUCCESS;
}
-
+
cd1 = iconv_open(GENERIC_SUPERSET_NAME, enc);

if (cd1 == (iconv_t)(-1)) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/sqlite3/libsqlite/sqlite3.c branches/PHP_5_3/ext/sqlite3/libsqlite/sqlite3.h branches/PHP_5_3/ext/sqlite3/libsqlite/sqlite3ext.h

2009-12-08 Thread Ilia Alshanetsky
iliaaTue, 08 Dec 2009 13:24:27 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291875

Log:
Upgraded to Sqlite 3.6.21

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/sqlite3/libsqlite/sqlite3.c
U   php/php-src/branches/PHP_5_3/ext/sqlite3/libsqlite/sqlite3.h
U   php/php-src/branches/PHP_5_3/ext/sqlite3/libsqlite/sqlite3ext.h
U   php/php-src/trunk/ext/sqlite3/libsqlite/sqlite3.c
U   php/php-src/trunk/ext/sqlite3/libsqlite/sqlite3.h
U   php/php-src/trunk/ext/sqlite3/libsqlite/sqlite3ext.h

diffs exceeded maximum size
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/sapi/apache/ php_apache.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 16:13:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291879

Log:
MFB: sprintf - snprintf (Thanks Marcus for not merging to HEAD..)

Changed paths:
U   php/php-src/trunk/sapi/apache/php_apache.c

Modified: php/php-src/trunk/sapi/apache/php_apache.c
===
--- php/php-src/trunk/sapi/apache/php_apache.c  2009-12-08 15:27:37 UTC (rev 
291878)
+++ php/php-src/trunk/sapi/apache/php_apache.c  2009-12-08 16:13:01 UTC (rev 
291879)
@@ -244,20 +244,20 @@
}

 #ifdef APACHE_RELEASE
-   sprintf(output_buf, %d, APACHE_RELEASE);
+   snprintf(output_buf, sizeof(output_buf), %d, APACHE_RELEASE);
php_info_print_table_row(2, Apache Release, output_buf);
 #endif
-   sprintf(output_buf, %d, MODULE_MAGIC_NUMBER);
+   snprintf(output_buf, sizeof(output_buf), %d, MODULE_MAGIC_NUMBER);
php_info_print_table_row(2, Apache API Version, output_buf);
-   sprintf(output_buf, %s:%u, serv-server_hostname, serv-port);
+   snprintf(output_buf, sizeof(output_buf), %s:%u, 
serv-server_hostname, serv-port);
php_info_print_table_row(2, Hostname:Port, output_buf);
 #if !defined(WIN32)  !defined(WINNT)
-   sprintf(output_buf, %s(%d)/%d, user_name, (int)user_id, 
(int)group_id);
+   snprintf(output_buf, sizeof(output_buf), %s(%d)/%d, user_name, 
(int)user_id, (int)group_id);
php_info_print_table_row(2, User/Group, output_buf);
-   sprintf(output_buf, Per Child: %d - Keep Alive: %s - Max Per 
Connection: %d, max_requests_per_child, serv-keep_alive ? on:off, 
serv-keep_alive_max);
+   snprintf(output_buf, sizeof(output_buf), Per Child: %d - Keep Alive: 
%s - Max Per Connection: %d, max_requests_per_child, serv-keep_alive ? 
on:off, serv-keep_alive_max);
php_info_print_table_row(2, Max Requests, output_buf);
 #endif
-   sprintf(output_buf, Connection: %d - Keep-Alive: %d, serv-timeout, 
serv-keep_alive_timeout);
+   snprintf(output_buf, sizeof(output_buf), Connection: %d - Keep-Alive: 
%d, serv-timeout, serv-keep_alive_timeout);
php_info_print_table_row(2, Timeouts, output_buf);
 #if !defined(WIN32)  !defined(WINNT)
 /*

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/sapi/apache/ libpre.c mod_php.c php_apache.c sapi_apache.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 16:13:46 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291880

Log:
- ws + cs

Changed paths:
U   php/php-src/trunk/sapi/apache/libpre.c
U   php/php-src/trunk/sapi/apache/mod_php.c
U   php/php-src/trunk/sapi/apache/php_apache.c
U   php/php-src/trunk/sapi/apache/sapi_apache.c

Modified: php/php-src/trunk/sapi/apache/libpre.c
===
--- php/php-src/trunk/sapi/apache/libpre.c	2009-12-08 16:13:01 UTC (rev 291879)
+++ php/php-src/trunk/sapi/apache/libpre.c	2009-12-08 16:13:46 UTC (rev 291880)
@@ -33,7 +33,7 @@


 #ifdef __GNUC__
-#include string.h/* memset */
+#include string.h /* memset */
 extern char _edata, _end ; /* end of DATA (start of BSS), end of BSS */
 #endif

@@ -41,15 +41,15 @@
 {
 /*	printf(Inside _lib_start\n);*/
 #ifdef __GNUC__
-memset (_edata, 0, _end - _edata);
+	memset (_edata, 0, _end - _edata);
 #endif
-return 0;
+	return 0;
 }

 int _lib_stop()
 {
 /*	printf(Inside _lib_stop\n);*/
-return 0;
+	return 0;
 }

 #endif	/* NETWARE */

Modified: php/php-src/trunk/sapi/apache/mod_php.c
===
--- php/php-src/trunk/sapi/apache/mod_php.c	2009-12-08 16:13:01 UTC (rev 291879)
+++ php/php-src/trunk/sapi/apache/mod_php.c	2009-12-08 16:13:46 UTC (rev 291880)
@@ -76,7 +76,7 @@
 	uint key_length;
 	uint value_length;
 	int type;
-char htaccess;
+	char htaccess;
 } php_per_dir_entry;

 /* some systems are missing these from their header files */
@@ -95,7 +95,7 @@
 static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC)
 {
 	int ret=0;
-
+
 	if (SG(server_context)) {
 		ret = rwrite(str, str_length, (request_rec *) SG(server_context));
 	}
@@ -137,7 +137,7 @@
 	if (!SG(read_post_bytes)  !ap_should_client_block(r)) {
 		return total_read_bytes;
 	}
-
+
 	handler = signal(SIGPIPE, SIG_IGN);
 	while (total_read_bytescount_bytes) {
 		hard_timeout(Read POST information, r); /* start timeout timer */
@@ -148,7 +148,7 @@
 		}
 		total_read_bytes += read_bytes;
 	}
-	signal(SIGPIPE, handler);
+	signal(SIGPIPE, handler);
 	return total_read_bytes;
 }
 /* }}} */
@@ -334,10 +334,10 @@
 		AP(in_request) = 0;
 		php_request_shutdown(dummy);
 	}
-	SG(server_context) = NULL;
-	/*
-	* The server context (request) is NOT invalid by the time
-	* run_cleanups() is called
+	SG(server_context) = NULL;
+	/*
+	* The server context (request) is NOT invalid by the time
+	* run_cleanups() is called
 	*/
 }
 /* }}} */
@@ -346,7 +346,7 @@
  */
 static int php_apache_sapi_activate(TSRMLS_D)
 {
-	request_rec *r = (request_rec *) SG(server_context);
+	request_rec *r = (request_rec *) SG(server_context);

 	/*
 	 * For the Apache module version, this bit of code registers a cleanup
@@ -354,7 +354,7 @@
 	 * We need this because at any point in our code we can be interrupted
 	 * and that may happen before we have had time to free our memory.
 	 * The php_request_shutdown function needs to free all outstanding allocated
-	 * memory.
+	 * memory.
 	 */
 	block_alarms();
 	register_cleanup(r-pool, NULL, php_apache_request_shutdown, php_request_shutdown_for_exec);
@@ -398,7 +398,7 @@
 	int fd;

 	fd = r-connection-client-fd;
-
+
 	if (fd = 0) {
 		if (nfd) *nfd = fd;
 		return SUCCESS;
@@ -413,9 +413,9 @@
 static int sapi_apache_force_http_10(TSRMLS_D)
 {
 	request_rec *r = SG(server_context);
-
+
 	r-proto_num = HTTP_VERSION(1,0);
-
+
 	return SUCCESS;
 }
 /* }}} */
@@ -461,7 +461,7 @@
 static sapi_module_struct apache_sapi_module = {
 	apache,		/* name */
 	Apache,		/* pretty name */
-
+
 	php_apache_startup,/* startup */
 	php_module_shutdown_wrapper,	/* shutdown */

@@ -576,11 +576,11 @@
  */
 static char *php_apache_get_default_mimetype(request_rec *r TSRMLS_DC)
 {
-
 	char *mimetype;
+	char *tmpmimetype;
+
 	/* Assume output will be of the default MIME type.  Individual
 	   scripts may change this later. */
-	char *tmpmimetype;
 	tmpmimetype = sapi_get_default_content_type(TSRMLS_C);
 	mimetype = pstrdup(r-pool, tmpmimetype);
 	efree(tmpmimetype);
@@ -621,7 +621,7 @@
 		if (per_dir_conf) {
 			zend_hash_apply((HashTable *) per_dir_conf, (apply_func_t) php_apache_alter_ini_entries TSRMLS_CC);
 		}
-
+
 		/* If PHP parser engine has been turned off with an engine off
 		 * directive, then decline to handle this request
 		 */
@@ -689,10 +689,9 @@
 {
 	int result = send_php(r, 0, NULL);
 	TSRMLS_FETCH();
-
-	ap_table_setn(r-notes, mod_php_memory_usage,
-		ap_psprintf(r-pool, %lu, zend_memory_peak_usage(1 TSRMLS_CC)));

+	ap_table_setn(r-notes, mod_php_memory_usage, ap_psprintf(r-pool, %lu, zend_memory_peak_usage(1 TSRMLS_CC)));
+
 	return result;
 }
 /* }}} */
@@ -853,7 +852,7 @@
 		bool_val[0] = '0';
 	}
 	bool_val[1] = 0;
-
+
 	return php_apache_value_handler_ex(cmd, conf, arg1, bool_val, mode);
 }
 /* }}} */
@@ -919,7 +918,7 @@

 #if MODULE_MAGIC_NUMBER = 19970728
 	

[PHP-CVS] svn: /php/php-src/trunk/Zend/ zend_highlight.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 16:32:26 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291882

Log:
ws

Changed paths:
U   php/php-src/trunk/Zend/zend_highlight.c

Modified: php/php-src/trunk/Zend/zend_highlight.c
===
--- php/php-src/trunk/Zend/zend_highlight.c 2009-12-08 16:32:01 UTC (rev 
291881)
+++ php/php-src/trunk/Zend/zend_highlight.c 2009-12-08 16:32:26 UTC (rev 
291882)
@@ -131,7 +131,7 @@
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) 
TSRMLS_CC);

if (Z_TYPE(token) == IS_STRING ||
-   Z_TYPE(token) == IS_UNICODE) {
+   Z_TYPE(token) == IS_UNICODE) {
switch (token_type) {
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
@@ -185,7 +185,7 @@
/* read the following character, either newline 
or ; */
if (lex_scan(token TSRMLS_CC) != T_WHITESPACE) 
{
zend_write(LANG_SCNG(yy_text), 
LANG_SCNG(yy_leng));
-   }
+   }
zend_write(\n, sizeof(\n) - 1);
prev_space = 1;
Z_TYPE(token) = 0;
@@ -197,7 +197,7 @@
}

if (Z_TYPE(token) == IS_STRING ||
-   Z_TYPE(token) == IS_UNICODE) {
+   Z_TYPE(token) == IS_UNICODE) {
switch (token_type) {
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3_FPM/scripts/ phpize.m4

2009-12-08 Thread Antony Dovgal
tony2001 Tue, 08 Dec 2009 17:06:07 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291885

Log:
MF5_3

Changed paths:
U   php/php-src/branches/PHP_5_3_FPM/scripts/phpize.m4

Modified: php/php-src/branches/PHP_5_3_FPM/scripts/phpize.m4
===
--- php/php-src/branches/PHP_5_3_FPM/scripts/phpize.m4  2009-12-08 16:59:10 UTC 
(rev 291884)
+++ php/php-src/branches/PHP_5_3_FPM/scripts/phpize.m4  2009-12-08 17:06:07 UTC 
(rev 291885)
@@ -1,6 +1,6 @@
 dnl This file becomes configure.in for self-contained extensions.

-divert(1001)
+divert(1)

 AC_PREREQ(2.13)
 AC_INIT(config.m4)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/sapi/apache2filter/ php_apache.h sapi_apache2.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 17:29:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291886

Log:
MFB: r215701, Reimplementation of the way Apache 2 Filter works.

Changed paths:
U   php/php-src/trunk/sapi/apache2filter/php_apache.h
U   php/php-src/trunk/sapi/apache2filter/sapi_apache2.c

Modified: php/php-src/trunk/sapi/apache2filter/php_apache.h
===
--- php/php-src/trunk/sapi/apache2filter/php_apache.h	2009-12-08 17:06:07 UTC (rev 291885)
+++ php/php-src/trunk/sapi/apache2filter/php_apache.h	2009-12-08 17:29:11 UTC (rev 291886)
@@ -48,12 +48,19 @@
 	int request_processed;
 } php_struct;

+typedef struct _php_apr_bucket_brigade {
+	apr_bucket_brigade *bb;
+} php_apr_bucket_brigade;
+
 void *merge_php_config(apr_pool_t *p, void *base_conf, void *new_conf);
 void *create_php_config(apr_pool_t *p, char *dummy);
 char *get_php_config(void *conf, char *name, size_t name_len);
 void apply_config(void *);
 extern const command_rec php_dir_cmds[];

+static size_t php_apache_read_stream(void *, char *, size_t TSRMLS_DC);
+static size_t php_apache_fsizer_stream(void * TSRMLS_DC);
+
 #define APR_ARRAY_FOREACH_OPEN(arr, key, val) 		\
 {	\
 	apr_table_entry_t *elts;		\

Modified: php/php-src/trunk/sapi/apache2filter/sapi_apache2.c
===
--- php/php-src/trunk/sapi/apache2filter/sapi_apache2.c	2009-12-08 17:06:07 UTC (rev 291885)
+++ php/php-src/trunk/sapi/apache2filter/sapi_apache2.c	2009-12-08 17:29:11 UTC (rev 291886)
@@ -39,6 +39,7 @@

 #include apr_strings.h
 #include ap_config.h
+#include apr_buckets.h
 #include util_filter.h
 #include httpd.h
 #include http_config.h
@@ -48,7 +49,7 @@
 #include http_log.h
 #include http_main.h
 #include util_script.h
-#include http_core.h
+#include http_core.h
 #include ap_mpm.h

 #include php_apache.h
@@ -75,26 +76,17 @@
 	f = ctx-f;

 	if (str_length == 0) return 0;
-
+
 	ba = f-c-bucket_alloc;
 	bb = apr_brigade_create(ctx-r-pool, ba);

 	b = apr_bucket_transient_create(str, str_length, ba);
 	APR_BRIGADE_INSERT_TAIL(bb, b);

-#if 0
-	/* Add a Flush bucket to the end of this brigade, so that
-	 * the transient buckets above are more likely to make it out
-	 * the end of the filter instead of having to be copied into
-	 * someone's setaside. */
-	b = apr_bucket_flush_create(ba);
-	APR_BRIGADE_INSERT_TAIL(bb, b);
-#endif
-
 	if (ap_pass_brigade(f-next, bb) != APR_SUCCESS || ctx-r-connection-aborted) {
 		php_handle_aborted_connection();
 	}
-
+
 	return str_length; /* we always consume all the data passed to us. */
 }

@@ -128,7 +120,7 @@
 			ptr = val;

 			*val = '\0';
-
+
 			do {
 val++;
 			} while (*val == ' ');
@@ -139,7 +131,7 @@
 apr_table_set(ctx-r-headers_out, sapi_header-header, val);
 			else
 apr_table_add(ctx-r-headers_out, sapi_header-header, val);
-
+
 			*ptr = ':';
 			return SAPI_HEADER_ADD;

@@ -167,7 +159,7 @@

 	to_read = ctx-post_len - ctx-post_idx;
 	n = MIN(to_read, count_bytes);
-
+
 	if (n  0) {
 		memcpy(buf, ctx-post_data + ctx-post_idx, n);
 		ctx-post_idx += n;
@@ -221,7 +213,7 @@
 {
 	php_struct *ctx = SG(server_context);
 	const char *env_var;
-
+
 	env_var = apr_table_get(ctx-r-subprocess_env, name);

 	return (char *) env_var;
@@ -235,7 +227,7 @@
 	char *key, *val;
 	int new_val_len;
 	UConverter *conv = ZEND_U_CONVERTER(UG(runtime_encoding_conv));
-
+
 	APR_ARRAY_FOREACH_OPEN(arr, key, val)
 		if (!val) {
 			val = ;
@@ -245,7 +237,7 @@
 			php_error(E_WARNING, Failed to decode _SERVER array entry);
 		}
 	APR_ARRAY_FOREACH_CLOSE()
-
+
 	if (php_register_variable_with_conv(conv, ZEND_STRL(PHP_SELF), ctx-r-uri,
 		strlen(ctx-r-uri), track_vars_array, PARSE_SERVER TSRMLS_CC) == FAILURE) {
 		php_error(E_WARNING, Failed to decode _SERVER array entry);
@@ -280,7 +272,7 @@
 	 * handler seems to act on the first flush bucket, but ignores
 	 * all further flush buckets.
 	 */
-
+
 	ba = ctx-r-connection-bucket_alloc;
 	bb = apr_brigade_create(ctx-r-pool, ba);
 	b = apr_bucket_flush_create(ba);
@@ -296,7 +288,7 @@
 	TSRMLS_FETCH();

 	ctx = SG(server_context);
-
+
 	if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */
 		ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, %s, msg);
 	}
@@ -308,12 +300,12 @@
 static int
 php_apache_disable_caching(ap_filter_t *f)
 {
-	/* Identify PHP scripts as non-cacheable, thus preventing
+	/* Identify PHP scripts as non-cacheable, thus preventing
 	 * Apache from sending a 304 status when the browser sends
 	 * If-Modified-Since header.
 	 */
 	f-r-no_local_copy = 1;
-
+
 	return OK;
 }

@@ -360,12 +352,12 @@
 	php_apache_sapi_register_variables,
 	php_apache_sapi_log_message,			/* Log message */
 	php_apache_sapi_get_request_time,		/* Get Request Time */
-	NULL,	/* Child terminate */
+	NULL,		/* Child terminate */

 	STANDARD_SAPI_MODULE_PROPERTIES
 };

-static 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/sapi/aolserver/ aolserver.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 17:30:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291887

Log:
MFH: static before const

Changed paths:
U   php/php-src/branches/PHP_5_3/sapi/aolserver/aolserver.c

Modified: php/php-src/branches/PHP_5_3/sapi/aolserver/aolserver.c
===
--- php/php-src/branches/PHP_5_3/sapi/aolserver/aolserver.c 2009-12-08 
17:29:11 UTC (rev 291886)
+++ php/php-src/branches/PHP_5_3/sapi/aolserver/aolserver.c 2009-12-08 
17:30:22 UTC (rev 291887)
@@ -245,7 +245,7 @@
 ZEND_END_ARG_INFO()
 /* }}} */

-const static zend_function_entry aolserver_functions[] = {
+static const zend_function_entry aolserver_functions[] = {
PHP_FE(getallheaders, arginfo_aolserver_getallheaders)
{NULL, NULL, NULL}
 };

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/sapi/ apache2handler/php_functions.c cli/php.1.in cli/php_cli_readline.c isapi/php5isapi.c litespeed/lsapilib.c

2009-12-08 Thread Jani Taskinen
jani Tue, 08 Dec 2009 17:46:19 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291888

Log:
MFB: sprintf - snprintf + all other patches people did not bother to merge

Changed paths:
U   php/php-src/trunk/sapi/apache2handler/php_functions.c
U   php/php-src/trunk/sapi/cli/php.1.in
U   php/php-src/trunk/sapi/cli/php_cli_readline.c
U   php/php-src/trunk/sapi/isapi/php5isapi.c
U   php/php-src/trunk/sapi/litespeed/lsapilib.c

Modified: php/php-src/trunk/sapi/apache2handler/php_functions.c
===
--- php/php-src/trunk/sapi/apache2handler/php_functions.c   2009-12-08 
17:30:22 UTC (rev 291887)
+++ php/php-src/trunk/sapi/apache2handler/php_functions.c   2009-12-08 
17:46:19 UTC (rev 291888)
@@ -396,27 +396,27 @@
if (apv  *apv) {
php_info_print_table_row(2, Apache Version, apv);
}
-   sprintf(tmp, %d, MODULE_MAGIC_NUMBER);
+   snprintf(tmp, sizeof(tmp), %d, MODULE_MAGIC_NUMBER);
php_info_print_table_row(2, Apache API Version, tmp);

if (serv-server_admin  *(serv-server_admin)) {
php_info_print_table_row(2, Server Administrator, 
serv-server_admin);
}

-   sprintf(tmp, %s:%u, serv-server_hostname, serv-port);
+   snprintf(tmp, sizeof(tmp), %s:%u, serv-server_hostname, serv-port);
php_info_print_table_row(2, Hostname:Port, tmp);

 #if !defined(WIN32)  !defined(WINNT)
 #if MODULE_MAGIC_NUMBER_MAJOR = 20081201
-   sprintf(tmp, %s(%d)/%d, ap_unixd_config.user_name, 
ap_unixd_config.user_id, ap_unixd_config.group_id);
+   snprintf(tmp, sizeof(tmp), %s(%d)/%d, ap_unixd_config.user_name, 
ap_unixd_config.user_id, ap_unixd_config.group_id);
 #else
-   sprintf(tmp, %s(%d)/%d, unixd_config.user_name, unixd_config.user_id, 
unixd_config.group_id);
+   snprintf(tmp, sizeof(tmp), %s(%d)/%d, unixd_config.user_name, 
unixd_config.user_id, unixd_config.group_id);
 #endif
php_info_print_table_row(2, User/Group, tmp);
 #endif

ap_mpm_query(AP_MPMQ_MAX_REQUESTS_DAEMON, max_requests);
-   sprintf(tmp, Per Child: %d - Keep Alive: %s - Max Per Connection: %d, 
max_requests, (serv-keep_alive ? on:off), serv-keep_alive_max);
+   snprintf(tmp, sizeof(tmp), Per Child: %d - Keep Alive: %s - Max Per 
Connection: %d, max_requests, (serv-keep_alive ? on:off), 
serv-keep_alive_max);
php_info_print_table_row(2, Max Requests, tmp);

apr_snprintf(tmp, sizeof tmp,

Modified: php/php-src/trunk/sapi/cli/php.1.in
===
--- php/php-src/trunk/sapi/cli/php.1.in 2009-12-08 17:30:22 UTC (rev 291887)
+++ php/php-src/trunk/sapi/cli/php.1.in 2009-12-08 17:46:19 UTC (rev 291888)
@@ -375,11 +375,6 @@
 .B http://www.php.net/manual/
 .PD 1
 .P
-A nice introduction to PHP by Stig Bakken can be found here:
-.PD 0
-.P
-.B http://www.zend.com/zend/art/intro.php
-.PD 1
 .SH BUGS
 You can view the list of known bugs or report any new bug you
 found at:

Modified: php/php-src/trunk/sapi/cli/php_cli_readline.c
===
--- php/php-src/trunk/sapi/cli/php_cli_readline.c   2009-12-08 17:30:22 UTC 
(rev 291887)
+++ php/php-src/trunk/sapi/cli/php_cli_readline.c   2009-12-08 17:46:19 UTC 
(rev 291888)
@@ -59,8 +59,6 @@
 #include zend_highlight.h
 #include zend_indent.h

-/* {{{ cli_is_valid_code
- */
 typedef enum {
body,
sstring,
@@ -74,7 +72,7 @@
outside,
 } php_code_type;

-int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC)
+int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) /* {{{ */
 {
int valid_end = 1, last_valid_end;
int brackets_count = 0;
@@ -458,9 +456,10 @@
efree(class_name);
}
if (pce  retval) {
-   char *tmp = malloc(class_name_len + 2 + strlen(retval) 
+ 1);
+   int len = class_name_len + 2 + strlen(retval) + 1;
+   char *tmp = malloc(len);

-   sprintf(tmp, %s::%s, (*pce)-name.s, retval);
+   snprintf(tmp, len, %s::%s, (*pce)-name.s, retval);
free(retval);
retval = tmp;
}
@@ -469,9 +468,7 @@
return retval;
 } /* }}} */

-/* {{{ cli_code_completion
- */
-char **cli_code_completion(const char *text, int start, int end)
+char **cli_code_completion(const char *text, int start, int end) /* {{{ */
 {
return rl_completion_matches(text, cli_completion_generator);
 }

Modified: php/php-src/trunk/sapi/isapi/php5isapi.c
===
--- php/php-src/trunk/sapi/isapi/php5isapi.c2009-12-08 17:30:22 UTC (rev 
291887)
+++ php/php-src/trunk/sapi/isapi/php5isapi.c2009-12-08 17:46:19 UTC (rev 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/spl/tests/iterator_056.phpt branches/PHP_5_2/ext/spl/tests/iterator_057.phpt branches/PHP_5_2/ext/spl/tests/iterator_058.phpt branches/PHP_5_2/ext/spl

2009-12-08 Thread William Martin
wimartin Tue, 08 Dec 2009 19:51:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291895

Log:
Backported 5.3 tests to 5.2 and added more RecursiveIteratorIterator tests

Changed paths:
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_056.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_057.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_058.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_059.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_060.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_061.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_062.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_063.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_064.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_065.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_066.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_067.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_069.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_070.phpt
A   php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_071.phpt
A   
php/php-src/branches/PHP_5_2/ext/spl/tests/recursiveIteratorIterator_beginchildren_error.phpt
A   
php/php-src/branches/PHP_5_2/ext/spl/tests/recursiveIteratorIterator_callHasChildren_error.phpt
A   
php/php-src/branches/PHP_5_2/ext/spl/tests/recursiveIteratorIterator_endchildren_error.phpt
A   
php/php-src/branches/PHP_5_2/ext/spl/tests/recursiveIteratorIterator_nextelement_error.phpt
A   php/php-src/branches/PHP_5_3/ext/spl/tests/iterator_069.phpt
A   php/php-src/branches/PHP_5_3/ext/spl/tests/iterator_070.phpt
A   php/php-src/branches/PHP_5_3/ext/spl/tests/iterator_071.phpt
A   
php/php-src/branches/PHP_5_3/ext/spl/tests/recursiveIteratorIterator_beginchildren_error.phpt
A   
php/php-src/branches/PHP_5_3/ext/spl/tests/recursiveIteratorIterator_callHasChildren_error.phpt
A   
php/php-src/branches/PHP_5_3/ext/spl/tests/recursiveIteratorIterator_endchildren_error.phpt
A   
php/php-src/branches/PHP_5_3/ext/spl/tests/recursiveIteratorIterator_nextelement_error.phpt
A   php/php-src/trunk/ext/spl/tests/iterator_069.phpt
A   php/php-src/trunk/ext/spl/tests/iterator_070.phpt
A   php/php-src/trunk/ext/spl/tests/iterator_071.phpt
A   
php/php-src/trunk/ext/spl/tests/recursiveIteratorIterator_beginchildren_error.phpt
A   
php/php-src/trunk/ext/spl/tests/recursiveIteratorIterator_callHasChildren_error.phpt
A   
php/php-src/trunk/ext/spl/tests/recursiveIteratorIterator_endchildren_error.phpt
A   
php/php-src/trunk/ext/spl/tests/recursiveIteratorIterator_nextelement_error.phpt

Added: php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_056.phpt
===
--- php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_056.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_056.phpt	2009-12-08 19:51:56 UTC (rev 291895)
@@ -0,0 +1,21 @@
+--TEST--
+SPL: FilterIterator::__construct(void)
+--SKIPIF--
+?php if (!extension_loaded(spl)) print skip; ?
+--CREDITS--
+Sebastian Schürmann
+--FILE--
+?php
+class myFilterIterator extends FilterIterator {
+	function accept() {
+
+	}
+}
+try {
+	$it = new myFilterIterator();
+} catch (InvalidArgumentException $e) {
+	echo 'InvalidArgumentException thrown';
+}
+?
+--EXPECT--
+InvalidArgumentException thrown

Added: php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_057.phpt
===
--- php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_057.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_057.phpt	2009-12-08 19:51:56 UTC (rev 291895)
@@ -0,0 +1,23 @@
+--TEST--
+SPL: ArrayIterator::__construct(void)
+--SKIPIF--
+?php if (!extension_loaded(spl)) print skip; ?
+--CREDITS--
+Sebastian Schürmann
+--FILE--
+?php
+/**
+ * From Docs: Construct a new array iterator from anything that has a hash table.
+ * NULL, NOTHING is not a hash table ;)
+ */
+class myArrayIterator extends ArrayIterator {
+}
+try {
+	$it = new myArrayIterator();
+} catch (InvalidArgumentException $e) {
+	echo 'InvalidArgumentException thrown';
+}
+echo 'no Exception thrown'
+?
+--EXPECT--
+no Exception thrown

Added: php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_058.phpt
===
--- php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_058.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/spl/tests/iterator_058.phpt	2009-12-08 19:51:56 UTC (rev 291895)
@@ -0,0 +1,26 @@
+--TEST--
+SPL: Iterator::__construct(void)
+--SKIPIF--
+?php if (!extension_loaded(spl)) print skip; ?
+--CREDITS--
+Sebastian Schürmann
+--FILE--
+?php

[PHP-CVS] svn: /php/php-src/trunk/win32/build/ Makefile

2009-12-08 Thread Pierre Joye
pajoye   Tue, 08 Dec 2009 20:21:17 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291896

Log:
- add missing argument

Changed paths:
U   php/php-src/trunk/win32/build/Makefile

Modified: php/php-src/trunk/win32/build/Makefile
===
--- php/php-src/trunk/win32/build/Makefile  2009-12-08 19:51:56 UTC (rev 
291895)
+++ php/php-src/trunk/win32/build/Makefile  2009-12-08 20:21:17 UTC (rev 
291896)
@@ -128,7 +128,7 @@
-del /f /q 
$(BUILD_DIR)\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
-del /f /q 
$(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
-del /f /q 
$(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
-   $(BUILD_DIR)\php.exe -d date.timezone=UTC -n -dphar.readonly=0 
win32/build/mkdist.php $(BUILD_DIR) $(PHPDLL) $(SAPI_TARGETS) 
$(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES) $(PECL_TARGETS) 
$(PECL_EXTRA_DIST_FILES) $(SNAPSHOT_TEMPLATE)
+   $(BUILD_DIR)\php.exe -d date.timezone=UTC -n -dphar.readonly=0 
win32/build/mkdist.php $(BUILD_DIR) $(PHP_BUILD) $(PHPDLL) 
$(SAPI_TARGETS) $(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES) $(PECL_TARGETS) 
$(PECL_EXTRA_DIST_FILES) $(SNAPSHOT_TEMPLATE)
cd $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
-$(ZIP) -9 -q -r 
..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
 .
cd ..\..

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/crypt_sha512.c trunk/ext/standard/crypt_sha512.c

2009-12-08 Thread Pierre Joye
pajoye   Wed, 09 Dec 2009 00:32:14 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291900

Log:
- drop non used code and fix warning

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c
U   php/php-src/trunk/ext/standard/crypt_sha512.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c2009-12-09 
00:20:14 UTC (rev 291899)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt_sha512.c2009-12-09 
00:32:14 UTC (rev 291900)
@@ -39,25 +39,14 @@
 #  include strings.h
 # endif
 #endif
-#if 0
-#ifndef stpncpy
-char * stpncpy(char *dst, const char *src, size_t len)
-{
-   size_t n = strlen(src);
-   if (n  len) {
-   n = len;
-   }
-   return strncpy(dst, src, len) + n;
-}
+
+#ifndef HAVE_MEMPCPY
+extern void * mempcpy(void * dst, const void * src, size_t len);
 #endif

-#ifndef mempcpy
-void * mempcpy(void * dst, const void * src, size_t len)
-{
-   return (((char *)memcpy(dst, src, len)) + len);
-}
+#ifndef HAVE_STRPNCPY
+extern char * stpncpy(char *dst, const char *src, size_t len);
 #endif
-#endif

 #ifndef MIN
 # define MIN(a, b) (((a)  (b)) ? (a) : (b))

Modified: php/php-src/trunk/ext/standard/crypt_sha512.c
===
--- php/php-src/trunk/ext/standard/crypt_sha512.c   2009-12-09 00:20:14 UTC 
(rev 291899)
+++ php/php-src/trunk/ext/standard/crypt_sha512.c   2009-12-09 00:32:14 UTC 
(rev 291900)
@@ -39,25 +39,14 @@
 #  include strings.h
 # endif
 #endif
-#if 0
-#ifndef stpncpy
-char * stpncpy(char *dst, const char *src, size_t len)
-{
-   size_t n = strlen(src);
-   if (n  len) {
-   n = len;
-   }
-   return strncpy(dst, src, len) + n;
-}
+
+#ifndef HAVE_MEMPCPY
+extern void * mempcpy(void * dst, const void * src, size_t len);
 #endif

-#ifndef mempcpy
-void * mempcpy(void * dst, const void * src, size_t len)
-{
-   return (((char *)memcpy(dst, src, len)) + len);
-}
+#ifndef HAVE_STRPNCPY
+extern char * stpncpy(char *dst, const char *src, size_t len);
 #endif
-#endif

 #ifndef MIN
 # define MIN(a, b) (((a)  (b)) ? (a) : (b))

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2009-12-08 Thread Pierre Joye
pajoye   Wed, 09 Dec 2009 00:35:30 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291901

Log:
- update

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-12-09 00:32:14 UTC (rev 291900)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-12-09 00:35:30 UTC (rev 291901)
@@ -22,6 +22,7 @@
 - Added support for CURLOPT_CERTINFO. FR #49253.
   (Linus Nielsen Feltzing li...@haxx.se)
 - Added client-side server name indication support in openssl. (Arnaud)
+- Added support for SHA-256 and SHA-512 to php's crypt. (Pierre)

 - Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)

@@ -37,6 +38,7 @@
 - Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
   (Jani)
 - Fixed bug #50340 (php.ini parser does not allow spaces in ini keys). (Jani)
+- Fixed bug #50334 (crypt ignores sha512 prefix). (Pierre)
 - Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN).
   (Ilia, Pierrick)
 - Fixed bug #50285 (xmlrpc does not preserve keys in encoded indexed arrays).

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/crypt.c branches/PHP_5_3/ext/standard/tests/strings/crypt_sha256.phpt branches/PHP_5_3/ext/standard/tests/strings/crypt_sha512.phpt trunk/ext

2009-12-08 Thread Pierre Joye
pajoye   Wed, 09 Dec 2009 01:43:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291904

Log:
- #50334, add CRYPT_SHA* constants and tests [DOC]

Bug: http://bugs.php.net/50334 (Closed) crypt ignores sha512 prefix
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/crypt.c
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crypt_sha256.phpt
A   
php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crypt_sha512.phpt
U   php/php-src/trunk/ext/standard/crypt.c
A   php/php-src/trunk/ext/standard/tests/strings/crypt_sha256.phpt
A   php/php-src/trunk/ext/standard/tests/strings/crypt_sha512.phpt

Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/crypt.c	2009-12-09 00:55:05 UTC (rev 291903)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt.c	2009-12-09 01:43:23 UTC (rev 291904)
@@ -106,7 +106,10 @@
 	REGISTER_LONG_CONSTANT(CRYPT_EXT_DES, PHP_EXT_DES_CRYPT, CONST_CS | CONST_PERSISTENT);
 	REGISTER_LONG_CONSTANT(CRYPT_MD5, PHP_MD5_CRYPT, CONST_CS | CONST_PERSISTENT);
 	REGISTER_LONG_CONSTANT(CRYPT_BLOWFISH, PHP_BLOWFISH_CRYPT, CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT(CRYPT_SHA256, PHP_SHA256_CRYPT, CONST_CS | CONST_PERSISTENT);
+	REGISTER_LONG_CONSTANT(CRYPT_SHA512, PHP_SHA512_CRYPT, CONST_CS | CONST_PERSISTENT);

+
 #ifdef PHP_USE_PHP_CRYPT_R
 	php_init_crypt_r();
 #endif

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crypt_sha256.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crypt_sha256.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crypt_sha256.phpt	2009-12-09 01:43:23 UTC (rev 291904)
@@ -0,0 +1,64 @@
+--TEST--
+crypt() SHA-256
+--SKIPIF--
+?php
+if (!function_exists('crypt') || !defined(CRYPT_SHA256)) {
+	die(SKIP crypt()-sha256 is not available);
+}
+?
+--FILE--
+?php
+
+$tests = array(
+	1 = array(
+		b'$5$saltstring',
+		b'Hello world!',
+		b'$5$saltstring$5B8vYYiY.CVt1RlTTf8KbXBH3hsxY/GNooZaBBGWEc5'
+	),
+	2 = array(
+		b'$5$rounds=1$saltstringsaltstring',
+		b'Hello world!',
+		b'$5$rounds=1$saltstringsaltst$3xv.VbSHBb41AL9AvLeujZkZRBAwqFMz2.opqey6IcA'
+	),
+	3 = array(
+		b'$5$rounds=1$saltstringsaltstring',
+		b'Hello world!',
+		b'$5$rounds=1$saltstringsaltst$3xv.VbSHBb41AL9AvLeujZkZRBAwqFMz2.opqey6IcA'
+	),
+	4 = array(
+		b'$5$rounds=5000$toolongsaltstring',
+		b'This is just a test',
+		b'$5$rounds=5000$toolongsaltstrin$Un/5jzAHMgOGZ5.mWJpuVolil07guHPvOW8mGRcvxa5'
+	),
+	5 = array(
+		b'$5$rounds=1400$anotherlongsaltstring',
+		b'a very much longer text to encrypt.  This one even stretches over morethan one line.',
+		b'$5$rounds=1400$anotherlongsalts$Rx.j8H.h8HjEDGomFU8bDkXm3XIUnzyxf12oP84Bnq1'
+	),
+	6 = array(
+		b'$5$rounds=7$short',
+		b'we have a short salt string but not a short password',
+		b'$5$rounds=7$short$JiO1O3ZpDAxGJeaDIuqCoEFysAe1mZNJRs3pw0KQRd/'
+	),
+	7 = array(
+		b'$5$rounds=123456$asaltof16chars..',
+		b'a short string',
+		b'$5$rounds=123456$asaltof16chars..$gP3VQ/6X7UUEW3HkBn2w1/Ptq2jxPyzV/cZKmF/wJvD'
+	),
+	8 = array(
+		b'$5$rounds=10$roundstoolow',
+		b'the minimum number is still observed',
+		b'$5$rounds=1000$roundstoolow$yfvwcWrQ8l/K0DAWyuPMDNHpIVlTQebY9l/gL972bIC'
+	)
+);
+
+foreach ($tests as $iter = $t) {
+	$res = crypt($t[1], $t[0]);
+	if ($res != $t[2]) echo Iteration $iter failed.
+Expected: $t[2]
+Got   $res\n;
+}
+echo Passes.;?
+--EXPECTF--
+Passes.
+

Added: php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crypt_sha512.phpt
===
--- php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crypt_sha512.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/strings/crypt_sha512.phpt	2009-12-09 01:43:23 UTC (rev 291904)
@@ -0,0 +1,60 @@
+--TEST--
+crypt() SHA-512
+--SKIPIF--
+?php
+if (!function_exists('crypt') || !defined(CRYPT_SHA512)) {
+	die(SKIP crypt()-sha512 is not available);
+}
+?
+--FILE--
+?php
+
+$tests = array(
+	1 = array(
+		b'$6$saltstring',
+		b'Hello world!',
+		b'$6$saltstring$svn8UoSVapNtMuq1ukKS4tPQd8iKwSMHWjl/O817G3uBnIFNjnQJuesI68u4OTLiBFdcbYEdFCoEOfaS35inz1'
+	),
+	2 = array(
+		b'$6$rounds=1$saltstringsaltstring',
+		b'Hello world!',
+		b'$6$rounds=1$saltstringsaltst$OW1/O6BYHV6BcXZu8QVeXbDWra3Oeqh0sbHbbMCVNSnCM/UrjmM0Dp8vOuZeHBy/YTBmSK6H9qs/y3RnOaw5v.'
+	),
+	3 = array(
+		b'$6$rounds=5000$toolongsaltstring',
+		b'This is just a test',
+		b'$6$rounds=5000$toolongsaltstrin$lQ8jolhgVRVhY4b5pZKaysCLi0QBxGoNeKQzQ3glMhwllF7oGDZxUhx1yxdYcz/e1JSbq3y6JMxxl8audkUEm0'
+	),
+	4 = array(
+		b'$6$rounds=1400$anotherlongsaltstring',
+		b'a very much longer text to encrypt.  This one even stretches over morethan one line.',