]> ruderich.org/simon Gitweb - nsscash/nsscash.git/blobdiff - nss/pw.c
nss: gr/pw: re-used variable
[nsscash/nsscash.git] / nss / pw.c
index c7e056666216c1cf7e3143dd5626583d1b22298d..c772bb10133e2d7c29feb4565f6327739cb2497e 100644 (file)
--- a/nss/pw.c
+++ b/nss/pw.c
@@ -151,7 +151,7 @@ static enum nss_status internal_getpw(struct search_key *key, struct passwd *res
         return NSS_STATUS_NOTFOUND;
     }
 
-    const char *e = h->data + h->off_data + *off;
+    const char *e = key->data + *off;
     if (!entry_to_passwd((struct passwd_entry *)e, result, buffer, buflen)) {
         unmap_file(&f);
         errno = ERANGE;