Ticket #148 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

libdaemon's daemon_close_all() stargs usage is wrong

Reported by: dcbw Owned by: lennart
Milestone: Avahi 0.6.21 Component: other
Keywords: Cc:

Description

It's only called with except_fd = -1, but the code assumes there will be more arguments. Therefore, it runs through random memory in the for loops trying to get the end of the varargs argument list, which is garbage memory because there arne't any.

Attachments

libdaemon-0.11-stdarg-fix.patch Download (1.2 KB) - added by dcbw 6 years ago.

Change History

Changed 6 years ago by dcbw

Changed 6 years ago by dcbw

The code needs to treat except_fd as the first argument, and all the stdargs arguments as additional to except_fd.

Changed 6 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed
  • component changed from avahi-core to other

Fixed in libdaemon 0.12. Thanks!

(I will update the Fedora packages soonish, although this is not really necessary because the 0.12 release doesn't bring anything new besides your fix which is included in the current packages anyway)

Changed 6 years ago by lennart

  • milestone set to Avahi 0.6.21
Note: See TracTickets for help on using tickets.