summaryrefslogtreecommitdiff
path: root/ext/standard/base64.c
Commit message (Collapse)AuthorAgeFilesLines
* year++Xinchen Hui2018-01-021-1/+1
|
* Provide zend_string wrappers for php_base64_(en|de)codeSara Golemon2017-07-161-6/+0
| | | | | Also pull existing php_base64_decode() proxy out to an inline. Bump PHP_API_VERSION for ABI change.
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Use new param API in standardSara Golemon2016-12-301-6/+10
|
* Merge branch 'PHP-7.0' into PHP-7.1Xinchen Hui2016-08-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.0: (48 commits) Update NEWs Unused label Fixed bug #72853 (stream_set_blocking doesn't work) fix test Bug #72663 - part 3 Bug #72663 - part 2 Bug #72663 - part 1 Update NEWS BLock test with memory leak fix tests Fix TSRM build Fix bug #72850 - integer overflow in uuencode Fixed bug #72849 - integer overflow in urlencode Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption Fix bug #72838 - Integer overflow lead to heap corruption in sql_regcase Fix bug #72837 - integer overflow in bzdecompress caused heap corruption Fix bug #72836 - integer overflow in base64_decode caused heap corruption Fix for bug #72807 - do not produce strings with negative length Fix for bug #72790 and bug #72799 Fix bug #72730 - imagegammacorrect allows arbitrary write access ... Conflicts: ext/standard/var_unserializer.c
| * Merge branch 'PHP-5.6' into PHP-7.0Stanislav Malyshev2016-08-171-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: (24 commits) Update NEWS BLock test with memory leak fix tests Fix TSRM build Fix bug #72850 - integer overflow in uuencode Fixed bug #72849 - integer overflow in urlencode Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption Fix bug #72838 - Integer overflow lead to heap corruption in sql_regcase Fix bug #72837 - integer overflow in bzdecompress caused heap corruption Fix bug #72836 - integer overflow in base64_decode caused heap corruption Fix for bug #72807 - do not produce strings with negative length Fix for bug #72790 and bug #72799 Fix bug #72730 - imagegammacorrect allows arbitrary write access Fix bug#72697 - select_colors write out-of-bounds Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF Fix bug #72750: wddx_deserialize null dereference Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack Improve fix for #72663 Fix bug #70436: Use After Free Vulnerability in unserialize() Fix bug #72749: wddx_deserialize allows illegal memory access ... Conflicts: Zend/zend_API.h ext/bz2/bz2.c ext/curl/interface.c ext/ereg/ereg.c ext/exif/exif.c ext/gd/gd.c ext/gd/tests/imagetruecolortopalette_error3.phpt ext/gd/tests/imagetruecolortopalette_error4.phpt ext/session/session.c ext/snmp/snmp.c ext/standard/base64.c ext/standard/ftp_fopen_wrapper.c ext/standard/quot_print.c ext/standard/url.c ext/standard/uuencode.c ext/standard/var.c ext/standard/var_unserializer.c ext/standard/var_unserializer.re ext/wddx/tests/bug72790.phpt ext/wddx/tests/bug72799.phpt ext/wddx/wddx.c sapi/cli/generate_mime_type_map.php
| | * Fix TSRM buildStanislav Malyshev2016-08-161-0/+1
| | |
| | * Fix bug #72836 - integer overflow in base64_decode caused heap corruptionStanislav Malyshev2016-08-161-0/+5
| | |
| * | base64_decode: fix bug #72264 ('VV= =' shouldn't fail in strict mode)Lauri Kenttä2016-07-071-17/+17
| | |
| * | base64_decode: remove redundant codeLauri Kenttä2016-07-071-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | case 1 is already handled in the first lines of the for loop; it would only be entered in the invalid case where the string continues past the defined length (ch != 0 but length-- == 0). case 2 and case 3 are redundant, since k >= j and later the string is truncated to j characters anyway.
| * | base64_decode: fix bug #72263 (skips char after padding)Lauri Kenttä2016-07-071-2/+3
| | |
| * | base64_decode: fix bug #72152 (fail on NUL bytes in strict mode)Lauri Kenttä2016-07-071-1/+6
| | | | | | | | | | | | | | | This added check is actually for NOT failing in NON-strict mode. The ch == -2 check later causes the desired failure in strict mode.
| * | base64_decode: remove redundant checkLauri Kenttä2016-07-071-5/+6
| | | | | | | | | | | | | | | | | | If length == 0 || *current != '=' is false, the for loop will always end up in this same point, until the if statement becomes true. Thus, the if statement is not needed.
| * | base64_decode: reorder to fix out of bounds readLauri Kenttä2016-07-071-9/+12
| | |
* | | Make base64_decode() in non-strict mode binary safeNikita Popov2016-07-221-4/+0
| | |
* | | base64_decode: Handle all invalid padding equallyLauri Kenttä2016-07-221-5/+0
| | |
* | | base64_decode: strict: Fail on excessive paddingLauri Kenttä2016-07-221-0/+5
| | |
* | | base64_decode: strict: Fail on truncated inputLauri Kenttä2016-07-221-0/+4
| | |
* | | base64_decode: Avoid code duplication in failuresLauri Kenttä2016-07-221-4/+6
| | |
* | | base64_decode: fix bug #72264 ('VV= =' shouldn't fail in strict mode)Lauri Kenttä2016-07-051-17/+17
| | |
* | | base64_decode: remove redundant codeLauri Kenttä2016-07-051-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | case 1 is already handled in the first lines of the for loop; it would only be entered in the invalid case where the string continues past the defined length (ch != 0 but length-- == 0). case 2 and case 3 are redundant, since k >= j and later the string is truncated to j characters anyway.
* | | base64_decode: fix bug #72263 (skips char after padding)Lauri Kenttä2016-07-051-2/+3
| | |
* | | base64_decode: fix bug #72152 (fail on NUL bytes in strict mode)Lauri Kenttä2016-07-051-1/+6
| | | | | | | | | | | | | | | This added check is actually for NOT failing in NON-strict mode. The ch == -2 check later causes the desired failure in strict mode.
* | | base64_decode: remove redundant checkLauri Kenttä2016-07-051-5/+6
| | | | | | | | | | | | | | | | | | If length == 0 || *current != '=' is false, the for loop will always end up in this same point, until the if statement becomes true. Thus, the if statement is not needed.
* | | base64_decode: reorder to fix out of bounds readLauri Kenttä2016-07-051-9/+12
|/ /
* | Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ \ | |/ | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
| * bump yearXinchen Hui2015-01-151-1/+1
| |
* | Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-11/+11
| | | | | | | | semantick changes).
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-3/+3
| |
* | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| |
* | remove useless checkAnatol Belski2014-09-191-4/+0
| |
* | first show to make 's' work with size_tAnatol Belski2014-08-271-2/+2
| |
* | master renames phase 3Anatol Belski2014-08-251-3/+3
| |
* | master renames phase 1Anatol Belski2014-08-251-5/+5
| |
* | several fixes -Anatol Belski2014-08-161-3/+3
| | | | | | | | | | | | - param parsing Z_PARAM_STR vs Z_PARAM_STRING - some functions for new params - etc
* | Refactor base64 to returning zend_stringXinchen Hui2014-02-241-39/+33
| |
* | Use better data structures (incomplete)Dmitry Stogov2014-02-101-2/+4
|/
* Bump yearXinchen Hui2014-01-031-1/+1
|
* Happy New YearXinchen Hui2013-01-011-1/+1
|
* Fix memory allocation checks for base64 encodeNikita Popov2012-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | base64_encode used safe_emalloc, but one of the arguments was derived from a multiplication, thus making the allocation unsafe again. There was a size check in place, but it was off by a factor of two as it didn't account for the signedness of the integer type. The unsafe allocation is not exploitable, but still causes funny behavior when the sized overflows into a negative number. To fix the issue the *4 factor is moved into the size argument (where it is known to be safe), so safe_emalloc can carry out the multiplication. The size check is removed as it doesn't really make sense once safe_emalloc works correctly. (Would only cause base64_encode to silently return false instead of throwing an error. Also could cause problems with other uses of the base64 encoding API, which all don't check for a NULL return value.) Furthermore the (length + 2) < 0 check is replaced with just length < 0. Allowing lengths -2 and -1 doesn't make sense semantically and also is not honored in the following code (negative length would access unallocated memory.) Actually the length < 0 check doesn't make sense altogether, but I left it there just to be safe.
* - Year++Felipe Pena2012-01-011-1/+1
|
* Fixed bug #55273 (base64_decode() with strict rejects whitespace after pad)Ilia Alshanetsky2011-09-121-0/+8
|
* - Year++Felipe Pena2011-01-011-1/+1
|
* Missing bit from previous commitIlia Alshanetsky2010-11-261-1/+1
|
* sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-031-1/+1
|
* Improved fix for bug #47174 & added a testIlia Alshanetsky2009-01-251-1/+0
|
* Fixed bug #47174 (base64_decode() interprets pad char in mid string asIlia Alshanetsky2009-01-211-1/+8
| | | | | terminator)
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|