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

Summary: libbsd: fgetln, fgetwln implementations are broken
Product: Red Hat Enterprise Linux 7 Reporter: Florian Weimer <fweimer>
Component: libbsdAssignee: Lukáš Tinkl <ltinkl>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: jgrulich, pknirsch
Target Milestone: rc   
Target Release: 7.0   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1162571 (view as bug list) Environment:
Last Closed: 2014-01-23 15:06:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1032518    

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.