Fix order of arguments given to memchr().
authorPatrik Lundin <patrik.lundin@it.su.se>
Thu, 30 Sep 2010 21:15:30 +0000 (23:15 +0200)
committerLove Hornquist Astrand <lha@h5l.org>
Fri, 1 Oct 2010 04:30:33 +0000 (21:30 -0700)
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
lib/kadm5/password_quality.c

index 577d5cf513976f6b6afb8043a4816055a129de83..8e2b0941d31a5796a5ff7a3dfd24103f83dad432 100644 (file)
@@ -148,7 +148,7 @@ external_passwd_quality (krb5_context context,
     char reply[1024];
     FILE *in = NULL, *out = NULL, *error = NULL;
 
-    if (memchr(pwd->data, pwd->length, '\n') != NULL) {
+    if (memchr(pwd->data, '\n', pwd->length) != NULL) {
        snprintf(message, length, "password contains newline, "
                 "not valid for external test");
        return 1;