f0466fb576
- include the suhosin extension and suhosin patch by default unless the no_suhosin flavor is defined - add all the suhosin configuration options to the sample config files
76 lines
3.0 KiB
Plaintext
76 lines
3.0 KiB
Plaintext
$OpenBSD: patch-ext_iconv_iconv_c,v 1.4 2007/11/14 10:53:50 robert Exp $
|
|
--- ext/iconv/iconv.c.orig Thu Nov 1 20:13:49 2007
|
|
+++ ext/iconv/iconv.c Tue Nov 13 11:45:09 2007
|
|
@@ -345,7 +345,7 @@ static php_iconv_err_t _php_iconv_appendl(smart_str *d
|
|
|
|
out_p = (d)->c + (d)->len;
|
|
|
|
- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
#if ICONV_SUPPORTS_ERRNO
|
|
switch (errno) {
|
|
case EINVAL:
|
|
@@ -509,7 +509,7 @@ PHP_ICONV_API php_iconv_err_t php_iconv_string(const c
|
|
out_p = out_buf;
|
|
|
|
while (in_left > 0) {
|
|
- result = iconv(cd, (char **) &in_p, &in_left, (char **) &out_p, &out_left);
|
|
+ result = iconv(cd, (const char **) &in_p, &in_left, (char **) &out_p, &out_left);
|
|
out_size = bsz - out_left;
|
|
if (result == (size_t)(-1)) {
|
|
if (errno == E2BIG && in_left > 0) {
|
|
@@ -623,7 +623,7 @@ static php_iconv_err_t _php_iconv_strlen(unsigned int
|
|
|
|
prev_in_left = in_left;
|
|
|
|
- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
if (prev_in_left == in_left) {
|
|
break;
|
|
}
|
|
@@ -744,7 +744,7 @@ static php_iconv_err_t _php_iconv_substr(smart_str *pr
|
|
|
|
prev_in_left = in_left;
|
|
|
|
- if (iconv(cd1, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
+ if (iconv(cd1, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
if (prev_in_left == in_left) {
|
|
break;
|
|
}
|
|
@@ -876,7 +876,7 @@ static php_iconv_err_t _php_iconv_strpos(unsigned int
|
|
|
|
prev_in_left = in_left;
|
|
|
|
- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
if (prev_in_left == in_left) {
|
|
#if ICONV_SUPPORTS_ERRNO
|
|
switch (errno) {
|
|
@@ -1125,7 +1125,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_st
|
|
|
|
out_left = out_size - out_reserved;
|
|
|
|
- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
#if ICONV_SUPPORTS_ERRNO
|
|
switch (errno) {
|
|
case EINVAL:
|
|
@@ -1225,7 +1225,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_st
|
|
out_p = buf;
|
|
out_left = out_size;
|
|
|
|
- if (iconv(cd, (char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
+ if (iconv(cd, (const char **)&in_p, &in_left, (char **) &out_p, &out_left) == (size_t)-1) {
|
|
#if ICONV_SUPPORTS_ERRNO
|
|
switch (errno) {
|
|
case EINVAL:
|
|
@@ -2534,7 +2534,7 @@ static int php_iconv_stream_filter_append_bucket(
|
|
tcnt = self->stub_len;
|
|
|
|
while (tcnt > 0) {
|
|
- if (iconv(self->cd, &pt, &tcnt, &pd, &ocnt) == (size_t)-1) {
|
|
+ if (iconv(self->cd, (const char **)&pt, &tcnt, &pd, &ocnt) == (size_t)-1) {
|
|
#if ICONV_SUPPORTS_ERRNO
|
|
switch (errno) {
|
|
case EILSEQ:
|