Subject: | Catalyst::Engine::HTTP doesn't check the return value of inet_aton() and fails to listen on any interface as a result |
I tried to start a Catalyst development server like this:
perl scriptmyapp_server.pl -h .0.0.0 -r
(note the invalid IP address)
Which resulted in this being printed on stdout:
perl scriptmyapp_server.pl -h .0.0.0 -r
(note the invalid IP address)
Which resulted in this being printed on stdout:
[info] Myapp powered by Catalyst 5.80016
Use of uninitialized value $addr in string eq at /usr/local/share/perl/5.10.1/Catalyst/Engine/HTTP.pm line 200.
Use of uninitialized value $addr in gethostbyaddr at /usr/local/share/perl/5.10.1/Catalyst/Engine/HTTP.pm line 205.
Use of uninitialized value in subroutine entry at /usr/local/share/perl/5.10.1/Catalyst/Engine/HTTP.pm line 205.
Bad arg length for Socket::inet_ntoa, length is 0, should be 4 at /usr/local/share/perl/5.10.1/Catalyst/Engine/HTTP.pm line 205.
Catalyst also failed to listen on any interface as a result.
Instead it should whine if you specify an invalid interface and check the return value of inet_aton.
Catalyst also failed to listen on any interface as a result.
Instead it should whine if you specify an invalid interface and check the return value of inet_aton.