Ticket 48351 - Fix buffer overflow error when reading url with len 0
https://fedorahosted.org/389/ticket/48351
Bug Description: In ldaputil.c it's possible to have url_to_use with a len of 0
This means we are reading from an undefined area of memory.
Fix Description: Check len before the smprintf, and if 0, then provide a
a default of "/" which matches the theoretical behaviour of the format. We also
have a stronger check to prevent NULL from being passed as a URL to validate.
Author: wibrown
Review by: nhosoi, mreynolds (Thanks!)