slpd.exe crashes on windows when started with "net.slp.useIPv6 = true"
Brought to you by:
jcalcote
Description:
When slpd is started on windows with "net.slp.useIPv6 = true",
slpd service fails to start with message "Error 1067: the process terminated unexpectedly".
On investigation it was found to be because of a buffer overflow exception caused in "SLPIfaceSockaddrsToString" function in slp_iface.c in libslpcommon.
This error is caused because the size fixed for interface is MAX_IFACE_LEN = 20 and value returned by system for this in function "SLPGetIfaceNameFromScopeId" is greater than that.
According to RFC#2863 the max length can be 64.
Changed the MAX_IFACE_LEN value to 64 according to RFC#2863.