]> granicus.if.org Git - shadow/commitdiff
* libmisc/salt.c (SHA_salt_rounds): It is statically ensured that
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 18 Sep 2011 20:41:38 +0000 (20:41 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 18 Sep 2011 20:41:38 +0000 (20:41 +0000)
the format fits in rounds_prefix.
* libmisc/loginprompt.c: Likewise.

ChangeLog
libmisc/loginprompt.c

index 270a231af6024e7abb89dcaaff397ee50d89bc6d..754763e4b9303bcb3afc6a6ca2dc01057a0b50e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * libmisc/salt.c (SHA_salt_rounds): It is statically ensured that
        the format fits in rounds_prefix.
+       * libmisc/loginprompt.c: Likewise.
 
 2011-09-18  Nicolas François  <nicolas.francois@centraliens.net>
 
index 239bc175e9f24bedbfe52d2a203aee0ea306514b..b008e2a2693d0a8710e1cbd19b21af1870729378 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1989 - 1993, Julianne Frances Haugh
  * Copyright (c) 1996 - 2000, Marek Michałkiewicz
  * Copyright (c) 2003 - 2005, Tomasz Kłoczko
- * Copyright (c) 2008 - 2010, Nicolas François
+ * Copyright (c) 2008 - 2011, Nicolas François
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -158,10 +158,9 @@ void login_prompt (const char *prompt, char *name, int namesize)
                                envp[envc] = nvar;
                        } else {
                                size_t len = strlen (nvar) + 32;
-                               int wlen;
                                envp[envc] = xmalloc (len);
-                               wlen = snprintf (envp[envc], len, "L%d=%s", count++, nvar);
-                               assert (wlen == (int) len -1);
+                               (void) snprintf (envp[envc], len,
+                                                "L%d=%s", count++, nvar);
                        }
                }
                set_env (envc, envp);