Bug 1032573 - libbsd: fgetln, fgetwln implementations are broken
libbsd: fgetln, fgetwln implementations are broken
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libbsd (Show other bugs)
7.0
All Linux
high Severity high
: rc
: 7.0
Assigned To: Lukáš Tinkl
qe-baseos-daemons
:
Depends On:
Blocks: 1032518
  Show dependency treegraph
 
Reported: 2013-11-20 07:21 EST by Florian Weimer
Modified: 2015-07-13 13:45 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1162571 (view as bug list)
Environment:
Last Closed: 2014-01-23 10:06:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Florian Weimer 2013-11-20 07:21:11 EST
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.