1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
--- shash-0.2.6/src/shash.c
+++ shash-0.2.6/src/shash.c
@@ -631,11 +631,11 @@
if (nosalt == FALSE && hmac == 1) {
if (sscanf
- (linebuf, "%s %s %s\n", hexbuffer, buffer,
- buffer2) < 2) {
+ (linebuf, "%s %s *%s\n", hexbuffer, buffer,
+ buffer2) != 3) {
if (sscanf
- (linebuf, "%s %s *%s\n", hexbuffer,
- buffer, buffer2) < 2)
+ (linebuf, "%s %s %s\n", hexbuffer,
+ buffer, buffer2) != 3)
continue;
}
@@ -648,11 +648,11 @@
key = pass2key(algorithm, keymode_buffer, &keylen, password, plen);
} else {
- if (sscanf(linebuf, "%s %s\n", buffer, buffer2) ==
- 0) {
+ if (sscanf(linebuf, "%s *%s\n", buffer, buffer2) !=
+ 2) {
if (sscanf
- (linebuf, "%s *%s\n", buffer,
- buffer2) == 0)
+ (linebuf, "%s %s\n", buffer,
+ buffer2) != 2)
continue;
}
|