projects
/
project
/
rpcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4bf5d60
)
session: fix argument order of crypt() and prevent segfault if /etc/config/rpcd does...
author
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 10 Sep 2013 18:12:39 +0000
(20:12 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Tue, 10 Sep 2013 18:12:39 +0000
(20:12 +0200)
session.c
patch
|
blob
|
history
diff --git
a/session.c
b/session.c
index df96ced89b4089227eae00671caa9c44b737c59d..5d403f0854dab746eb4e438faf028e3e19c35494 100644
(file)
--- a/
session.c
+++ b/
session.c
@@
-792,7
+792,7
@@
rpc_login_test_password(const char *hash, const char *password)
#endif
}
#endif
}
- crypt_hash = crypt(
hash, password
);
+ crypt_hash = crypt(
password, hash
);
return !strcmp(crypt_hash, hash);
}
return !strcmp(crypt_hash, hash);
}
@@
-801,7
+801,7
@@
static struct uci_section *
rpc_login_test_login(struct uci_context *uci,
const char *username, const char *password)
{
rpc_login_test_login(struct uci_context *uci,
const char *username, const char *password)
{
- struct uci_package *p;
+ struct uci_package *p
= NULL
;
struct uci_section *s;
struct uci_element *e;
struct uci_ptr ptr = { .package = "rpcd" };
struct uci_section *s;
struct uci_element *e;
struct uci_ptr ptr = { .package = "rpcd" };