Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
php72.16743
php72-pspell-do-not-allow-ucs.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php72-pspell-do-not-allow-ucs.patch of Package php72.16743
Index: php-5.3.17/ext/pspell/pspell.c =================================================================== --- php-5.3.17.orig/ext/pspell/pspell.c 2012-09-12 23:27:16.000000000 +0200 +++ php-5.3.17/ext/pspell/pspell.c 2020-02-05 16:31:27.824650828 +0100 @@ -316,7 +316,16 @@ static PHP_FUNCTION(pspell_new) } if (encoding_len) { - pspell_config_replace(config, "encoding", encoding); + if (!strcasecmp(encoding, "ucs-2") || + !strcasecmp(encoding, "ucs-4") || + !strcasecmp(encoding, "machine unsigned 16") || + !strcasecmp(encoding, "machine unsigned 32") || + !strcasecmp(encoding, "utf-16") || + !strcasecmp(encoding, "utf-32")) { + php_error_docref(NULL, E_WARNING, "PSPELL does not support UCS-2 and UCS-4"); + } else { + pspell_config_replace(config, "encoding", encoding); + } } if (argc > 4) { @@ -431,7 +440,16 @@ static PHP_FUNCTION(pspell_new_personal) } if (encoding_len) { - pspell_config_replace(config, "encoding", encoding); + if (!strcasecmp(encoding, "ucs-2") || + !strcasecmp(encoding, "ucs-4") || + !strcasecmp(encoding, "machine unsigned 16") || + !strcasecmp(encoding, "machine unsigned 32") || + !strcasecmp(encoding, "utf-16") || + !strcasecmp(encoding, "utf-32")) { + php_error_docref(NULL, E_WARNING, "PSPELL does not support UCS-2 and UCS-4"); + } else { + pspell_config_replace(config, "encoding", encoding); + } } if (argc > 5) { @@ -745,7 +763,16 @@ static PHP_FUNCTION(pspell_config_create } if (encoding_len) { - pspell_config_replace(config, "encoding", encoding); + if (!strcasecmp(encoding, "ucs-2") || + !strcasecmp(encoding, "ucs-4") || + !strcasecmp(encoding, "machine unsigned 16") || + !strcasecmp(encoding, "machine unsigned 32") || + !strcasecmp(encoding, "utf-16") || + !strcasecmp(encoding, "utf-32")) { + php_error_docref(NULL, E_WARNING, "PSPELL does not support UCS-2 and UCS-4"); + } else { + pspell_config_replace(config, "encoding", encoding); + } } /* By default I do not want to write anything anywhere because it'll try to write to $HOME
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor