Fix usage of strerror_r
Bug #1313905 reported by
Michael Terry
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
electric-fence (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
During build, the following warning appears:
page.c: In function 'stringErrorRep
page.c:46:2: warning: return makes pointer from integer without a cast [enabled by default]
return strerror_
^
It indicates the XSI version of strerror_r is being used, but the code is expecting the GNU one (see the man page for strerror_r).
This bug will manifest as a lack of detailed error messages (because it will think strerror is returning NULL most of the time). But on the off-chance that 128 bytes isn't long enough for the error message, it means that electric-fence will try to print from a bogus address like 32 (errno value).
To post a comment you must log in.