projects
/
hashcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
19c548c
)
fixed some parser checks to avoid crashes (-m 5300/5400)
author
philsmd
<philsmd@hashcat.net>
Sun, 20 Mar 2016 18:24:21 +0000
(19:24 +0100)
committer
philsmd
<philsmd@hashcat.net>
Sun, 20 Mar 2016 18:24:21 +0000
(19:24 +0100)
docs/changes.txt
patch
|
blob
|
history
src/shared.c
patch
|
blob
|
history
diff --git
a/docs/changes.txt
b/docs/changes.txt
index
2335f80
..
6f5759d
100644
(file)
--- a/
docs/changes.txt
+++ b/
docs/changes.txt
@@
-163,6
+163,10
@@
Type.: Bug
File.: Host
Desc.: Fixed some checks in the parser of -m 1711 = SSHA-512(Base64), LDAP {SSHA512}
File.: Host
Desc.: Fixed some checks in the parser of -m 1711 = SSHA-512(Base64), LDAP {SSHA512}
+Type.: Bug
+File.: Host
+Desc.: Fixed some checks in the parser of -m 5300 = IKE-PSK MD5 and -m 5400 = IKE-PSK SHA1
+
* changes v2.00 -> v2.01:
Type.: Bug
* changes v2.00 -> v2.01:
Type.: Bug
diff --git
a/src/shared.c
b/src/shared.c
index
977cd0e
..
afb3d47
100644
(file)
--- a/
src/shared.c
+++ b/
src/shared.c
@@
-12195,6
+12195,8
@@
int ikepsk_md5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
in_off[0] = strtok (input_buf, ":");
in_off[0] = strtok (input_buf, ":");
+ if (in_off[0] == NULL) return (PARSER_SEPARATOR_UNMATCHED);
+
in_len[0] = strlen (in_off[0]);
size_t i;
in_len[0] = strlen (in_off[0]);
size_t i;
@@
-12280,6
+12282,8
@@
int ikepsk_sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf)
in_off[0] = strtok (input_buf, ":");
in_off[0] = strtok (input_buf, ":");
+ if (in_off[0] == NULL) return (PARSER_SEPARATOR_UNMATCHED);
+
in_len[0] = strlen (in_off[0]);
size_t i;
in_len[0] = strlen (in_off[0]);
size_t i;