Fix usage of strerror_r

Bug #1313905 reported by Michael Terry
6
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 'stringErrorReport':
page.c:46:2: warning: return makes pointer from integer without a cast [enabled by default]
  return strerror_r(errno,(char *)err_message,128);
  ^

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.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.