ed(1): switch two statements so we check the index before dereferencing.
This is related to r270256 but was missed in that occasion. MFC after: 3 days
This commit is contained in:
parent
ef6b515b69
commit
8123f597e9
@ -257,7 +257,7 @@ expand_des_key(char *obuf, char *kbuf)
|
||||
/*
|
||||
* now translate it, bombing on any illegal binary digit
|
||||
*/
|
||||
for (i = 0; kbuf[i] && i < 16; i++)
|
||||
for (i = 0; i < 16 && kbuf[i]; i++)
|
||||
if ((nbuf[i] = hex_to_binary((int) kbuf[i], 2)) == -1)
|
||||
des_error("bad binary digit in key");
|
||||
while (i < 64)
|
||||
|
Loading…
x
Reference in New Issue
Block a user