home: fix strv NUL termination
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Apr 2020 11:46:10 +0000 (13:46 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 30 May 2020 18:05:26 +0000 (20:05 +0200)
Fixes: #15559
(cherry picked from commit 113a51d22139ecb8d60163ec1a5bf05016cfeb77)

src/home/pwquality-util.c

index 5863a229b80850a557a5a88be139fb1ab8d2b457..fbf6f6c8cc90cff44c80ef0e4dce69cec89b22fa 100644 (file)
@@ -148,7 +148,7 @@ int suggest_passwords(void) {
 
         pwquality_maybe_disable_dictionary(pwq);
 
-        suggestions = new0(char*, N_SUGGESTIONS);
+        suggestions = new0(char*, N_SUGGESTIONS+1);
         if (!suggestions)
                 return log_oom();