Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if !gethostbyname(host)->h_aliases #4043

Closed
vicuna opened this issue Jun 9, 2006 · 1 comment
Closed

Crash if !gethostbyname(host)->h_aliases #4043

vicuna opened this issue Jun 9, 2006 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Jun 9, 2006

Original bug ID: 4043
Reporter: grenie
Status: closed (set by @xavierleroy on 2006-06-10T09:11:02Z)
Resolution: fixed
Priority: normal
Severity: trivial
Version: 3.09.2
Category: ~DO NOT USE (was: OCaml general)

Bug description

In unix_gethostbyname(), my C library gethostbyname() returns a pointer to a structure where h_aliases is a null pointer (as far as I understand, it should not happen, but, well, it does...). I just wanted to suggest to modify alloc_host_entry's
aliases = copy_string_array((const char**)entry->h_aliases);
in
if (entry->h_aliases)
aliases = copy_string_array((const char**)entry->h_aliases);
else
aliases = Atom(0);
or something similar.

Additional information

Works on a broadcom 4702 MIPS (32 bit, small endian) "computer", cross compiled from an x86.

@vicuna
Copy link
Author

vicuna commented Jun 10, 2006

Comment author: @xavierleroy

Fixed as suggested in 3.09 bugfix branch

@vicuna vicuna closed this as completed Jun 10, 2006
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant