Opened 13 days ago

Last modified 13 days ago

#2214 review defect

Cactus: handle error in gethostname

Reported by: Roland Haas Owned by:
Priority: minor Milestone:
Component: Cactus Version: development version
Keywords: Cc:


This works around deficiencies of the gethostname call, namely that it does not return an error of the supplied buffer is too small and that it may not include a NUL byte at the end of the buffer if the buffer was too small and the returned name was truncated.

This should not happen (often) in practise since glibc already has a similar workaround in place, but may happen eg on a Mac if they indeed use a non glibc C library.

Pull request is here:

Attachments (0)

Change History (1)

comment:1 Changed 13 days ago by Roland Haas

Status: newreview

Modify Ticket

Change Properties
Set your email in Preferences
as review The ticket will remain with no owner.
Next status will be 'reviewed_ok'.
as The resolution will be set.
The resolution will be deleted.
to The owner will be changed from (none) to the specified user.
to The owner will be changed from (none) to the specified user.
The owner will be changed from (none) to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.