diff --git a/nslcd/attmap.c b/nslcd/attmap.c index d024a59..498d907 100644 --- a/nslcd/attmap.c +++ b/nslcd/attmap.c @@ -276,7 +276,7 @@ const char *attmap_get_value(MYLDAP_ENTRY *entry, const char *attr, return NULL; if (strlen(values[0]) >= buflen) { - log_log(LOG_ERR, "attmap_get_value(): buffer too small (%d required)", + log_log(LOG_ERR, "attmap_get_value(): buffer too small (%zu required)", strlen(values[0])); return NULL; } diff --git a/nslcd/cfg.c b/nslcd/cfg.c index 4928244..ce38d22 100644 --- a/nslcd/cfg.c +++ b/nslcd/cfg.c @@ -457,7 +457,7 @@ static void add_uris_from_dns(const char *filename, int lnr, hostlist[strlen(hostlist) - 4] = '\0'; if (mysnprintf(buf, sizeof(buf), "ldaps://%s", hostlist)) { - log_log(LOG_ERR, "add_uris_from_dns(): buf buffer too small (%d required)", + log_log(LOG_ERR, "add_uris_from_dns(): buf buffer too small (%zu required)", strlen(hostlist) + 8); exit(EXIT_FAILURE); } @@ -469,7 +469,7 @@ static void add_uris_from_dns(const char *filename, int lnr, hostlist[strlen(hostlist) - 4] = '\0'; if (mysnprintf(buf, sizeof(buf), "ldap://%s", hostlist)) { - log_log(LOG_ERR, "add_uris_from_dns(): buf buffer too small (%d required)", + log_log(LOG_ERR, "add_uris_from_dns(): buf buffer too small (%zu required)", strlen(hostlist) + 7); exit(EXIT_FAILURE); } diff --git a/nslcd/myldap.c b/nslcd/myldap.c index 2501974..f34221f 100644 --- a/nslcd/myldap.c +++ b/nslcd/myldap.c @@ -1064,14 +1064,14 @@ int myldap_set_credentials(MYLDAP_SESSION *session, const char *dn, if (strlen(dn) >= sizeof(session->binddn)) { log_log(LOG_ERR, - "myldap_set_credentials(): binddn buffer too small (%d required)", + "myldap_set_credentials(): binddn buffer too small (%zu required)", strlen(dn)); return -1; } if (strlen(password) >= sizeof(session->bindpw)) { log_log(LOG_ERR, - "myldap_set_credentials(): bindpw buffer too small (%d required)", + "myldap_set_credentials(): bindpw buffer too small (%zu required)", strlen(password)); return -1; } @@ -1729,7 +1729,7 @@ static char **myldap_get_ranged_values(MYLDAP_ENTRY *entry, const char *attr) /* 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)", + log_log(LOG_ERR, "myldap_get_ranged_values(): attbuf buffer too small (%zu required)", strlen(attr) + 10); return NULL; }