]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: debian #326407
authorThorsten Kukuk <kukuk@thkukuk.de>
Tue, 25 Nov 2008 14:04:55 +0000 (14:04 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Tue, 25 Nov 2008 14:04:55 +0000 (14:04 +0000)
Purpose of commit: bugfix

Commit summary:
---------------

2008-11-25  Thorsten Kukuk  <kukuk@thkukuk.de>

        * modules/pam_time/pam_time.c (is_same): Fix check
        of correct string length (debian bug #326407).

ChangeLog
modules/pam_time/pam_time.c

index a91eb2d566d774748372d0da151d16ae23f89aa8..4f688036519c54b005bc8d8921fb04ef2b68cf7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-25  Thorsten Kukuk  <kukuk@thkukuk.de>
+
+       * modules/pam_time/pam_time.c (is_same): Fix check
+       of correct string length (debian bug #326407).
+
 2008-11-24  Thorsten Kukuk  <kukuk@thkukuk.de>
 
        * xtests/Makefile.am: Add pam_time1 tests.
index 8e3b2486e80da7aeac95c06d569cfdde759fc656..7e418808036e88cd1f4df8d6abf74ef4643ee6be 100644 (file)
@@ -358,8 +358,8 @@ is_same(pam_handle_t *pamh UNUSED, const void *A, const char *b,
 
      /* Ok, we know that b is a substring from A and does not contain
         wildcards, but now the length of both strings must be the same,
-        too. */
-     if (strlen (a) != strlen(b))
+        too. In this case it means, a[i] has to be the end of the string. */
+     if (a[i] != '\0')
           return FALSE;
 
      return ( !len );