Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1032573 - libbsd: fgetln, fgetwln implementations are broken
Summary: libbsd: fgetln, fgetwln implementations are broken
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libbsd
Version: 7.0
Hardware: All
OS: Linux
Target Milestone: rc
: 7.0
Assignee: Lukáš Tinkl
QA Contact: qe-baseos-daemons
Depends On:
TreeView+ depends on / blocked
Reported: 2013-11-20 12:21 UTC by Florian Weimer
Modified: 2015-07-13 17:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1162571 (view as bug list)
Last Closed: 2014-01-23 15:06:20 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Florian Weimer 2013-11-20 12:21:11 UTC
The implementation is broken because it is not thread-safe and does not really follow the behavior of the BSD function (the returned string could be destroyed by independent read operations on other streams).

I couldn't find any external users of these functions (as defined in libbsd), so it's probably safer to remove these functions.

fparseln could be implemented directly on top of getline because it does not return the pointer obtained from fgetln.

Note You need to log in before you can comment on or make changes to this bug.