php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77422 inet_pton() does not produce warning on wrong input anymore
Submitted: 2019-01-07 10:03 UTC Modified: 2019-01-07 10:51 UTC
From: d dot naumenko dot a at gmail dot com Assigned:
Status: Closed Package: *Network Functions
PHP Version: 7.3.1RC1 OS: MacOS Mojave
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 + 10 = ?
Subscribe to this entry?

 
 [2019-01-07 10:03 UTC] d dot naumenko dot a at gmail dot com
Description:
------------
Before PHP 7.3, function inet_pton() produced warning on wrong input IP address. It is NOT stated in the documentation, that there should be any warning, however the behavior is changed and it is not mentioned in a changelog.

Test script:
---------------
https://3v4l.org/55pn5

Expected result:
----------------
Warning is produced

Actual result:
--------------
No warning is produced

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-07 10:46 UTC] sjon at hortensius dot net
this was apparently done on purpose: https://github.com/php/php-src/commit/658a23a9741f6812fcbce32b2811db348edbe91e#diff-742258ef492c653aea63801c951de6f7

I originally wanted to report this as well - but on second thought I support this change - for functions returning false it isn't necessary to also log a warning
 [2019-01-07 10:51 UTC] d dot naumenko dot a at gmail dot com
-Status: Open +Status: Closed
 [2019-01-07 10:51 UTC] d dot naumenko dot a at gmail dot com
Indeed. I have missed the fact that this change is mentioned in Changelog. Closing
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC