summaryrefslogtreecommitdiff
path: root/nslcd/myldap.c
diff options
context:
space:
mode:
Diffstat (limited to 'nslcd/myldap.c')
-rw-r--r--nslcd/myldap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c
index 8b97447..53f5b97 100644
--- a/nslcd/myldap.c
+++ b/nslcd/myldap.c
@@ -1701,7 +1701,11 @@ static char **myldap_get_ranged_values(MYLDAP_ENTRY *entry, const char *attr)
SET *set = NULL;
/* build the attribute name to find */
if (mysnprintf(attbuf, sizeof(attbuf), "%s;range=0-*", attr))
+ {
+ log_log(LOG_ERR, "myldap_get_ranged_values(): attbuf buffer too small (%d required)",
+ strlen(attr) + 10);
return NULL;
+ }
/* keep doing lookups untul we can't get any more results */
while (1)
{
@@ -1749,7 +1753,10 @@ static char **myldap_get_ranged_values(MYLDAP_ENTRY *entry, const char *attr)
startat = nxt;
/* build attributes for a new search */
if (mysnprintf(attbuf, sizeof(attbuf), "%s;range=%d-*", attr, startat))
+ {
+ log_log(LOG_ERR, "myldap_get_ranged_values(): attbuf buffer too small");
break;
+ }
attrs[0] = attbuf;
attrs[1] = NULL;
/* close the previous search, if any */