Re: [PHP-DEV] base64_decode is buggy, what to fix?

2016-05-22 Thread Joe Watkins
Morning, Would it be possible to open a PR that fixes the programming errors, such as oob read, and the strange flow of the subsequent block ? Assuming those fixes don't effect normal usage, I see no reason why that can't be merged immediately. When it comes to changing the

Re: [PHP-DEV] base64_decode is buggy, what to fix?

2016-05-22 Thread Yasuo Ohgaki
Hi Lauri, On Sun, May 22, 2016 at 7:56 PM, Lauri Kenttä wrote: > > Suggestions? IMHO Return FALSE for any invalid input when strict mode is on. Enable strict mode by default. Keep current behavior when strict mode is off. would be the best. Regards, -- Yasuo Ohgaki

Re: [PHP-DEV] base64_decode is buggy, what to fix?

2016-05-22 Thread Scott Arciszewski
On Sun, May 22, 2016 at 6:56 AM, Lauri Kenttä wrote: > Hello, Internals! > > I was fixing #72152 when it became apparent that the base64_decode function > is very buggy. > > > - Null byte ends processing. > > - "V" produces empty result, while "V=" fails. Not very logical.

[PHP-DEV] base64_decode is buggy, what to fix?

2016-05-22 Thread Lauri Kenttä
Hello, Internals! I was fixing #72152 when it became apparent that the base64_decode function is very buggy. - Null byte ends processing. - "V" produces empty result, while "V=" fails. Not very logical. - Too short padding is allowed, e.g. "VV=" works like "VV==". - Extra padding is