Blob Blame History Raw
Store an empty string in the passed-in buffer, even if we don't manage to get
the desired value from the entry.

Index: nslcd/attmap.c
===================================================================
--- nslcd/attmap.c	(revision 1110)
+++ nslcd/attmap.c	(working copy)
@@ -254,6 +254,8 @@
 MUST_USE const char *attmap_get_value(MYLDAP_ENTRY *entry,const char *attr,char *buffer,size_t buflen)
 {
   const char **values;
+  if (buflen > 0)
+    buffer[0]='\0';
   /* for simple values just return the attribute */
   if (attr[0]!='"')
   {