php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8884 gethostbyaddr returns a 15 chars string IP when an error occurs
Submitted: 2001-01-24 09:07 UTC Modified: 2001-03-16 16:38 UTC
From: almico at almico dot com Assigned:
Status: Closed Package: Network related
PHP Version: 4.0.4pl1 OS: Linux RedHat 7.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: almico at almico dot com
New email:
PHP Version: OS:

 

 [2001-01-24 09:07 UTC] almico at almico dot com
gethostbyaddr returns the original IP when an error occurs, but this string is always 15 chars long. This means that if the original IP was shorter than that, garbage will appear at the end of the line. I've temporarily fixed it by passing an IP with 15 blanks added to its end.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-24 19:24 UTC] sniper@php.net
I can't reproduce this. Could you please include an example script which
demonstrates this behaviour? And maybe try the latest CVS snapshot
from http://snaps.php.net/  too??

--Jani

 [2001-03-16 16:38 UTC] sniper@php.net
Works for me (4.0.5-dev) and no feedback.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 21:01:29 2024 UTC