Displaying 1 result from an estimated 1 matches for "4b0deeb".
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...nt ();
while ((pw = getpwent ()) != NULL) {
if (strlen (pw->pw_name) == ulen &&
- strncmp (username, pw->pw_name, ulen) == 0)
+ STREQLEN (username, pw->pw_name, ulen))
return pw->pw_dir;
}
diff --git a/hivex/hivex.c b/hivex/hivex.c
index 8ea2c2b..4b0deeb 100644
--- a/hivex/hivex.c
+++ b/hivex/hivex.c
@@ -143,7 +143,7 @@ struct ntreg_hbin_block {
} __attribute__((__packed__));
#define BLOCK_ID_EQ(h,offs,eqid) \
- (strncmp (((struct ntreg_hbin_block *)((h)->addr + (offs)))->id, (eqid), 2) == 0)
+ (STREQLEN (((struct ntreg_hbin_block *)((h)...