Fix assert on base64 crypto final call without buf (#517)
This commit is contained in:
parent
4b9e575cac
commit
7408e30cba
2 changed files with 6 additions and 0 deletions
|
|
@ -46,6 +46,9 @@ static bool update(RzCrypto *cry, const ut8 *buf, int len) {
|
|||
}
|
||||
|
||||
static bool final(RzCrypto *cry, const ut8 *buf, int len) {
|
||||
if (!buf) {
|
||||
return true;
|
||||
}
|
||||
return update(cry, buf, len);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,18 +83,21 @@ NAME=rz-hash -D base64 -s "YWRtaW4="
|
|||
FILE=-
|
||||
CMDS=!rz-hash -D base64 -s "YWRtaW4="
|
||||
EXPECT=admin
|
||||
EXPECT_ERR=
|
||||
RUN
|
||||
|
||||
NAME=rz-hash -E base64 -s "admin"
|
||||
FILE=-
|
||||
CMDS=!rz-hash -E base64 -s "admin"
|
||||
EXPECT=YWRtaW4=
|
||||
EXPECT_ERR=
|
||||
RUN
|
||||
|
||||
NAME=rz-hash -E base64 -x "61646d696e"
|
||||
FILE=-
|
||||
CMDS=!rz-hash -E base64 -x "61646d696e"
|
||||
EXPECT=YWRtaW4=
|
||||
EXPECT_ERR=
|
||||
RUN
|
||||
|
||||
NAME=rz-hash -a md5 -x "61646d696e"
|
||||
|
|
|
|||
Loading…
Reference in a new issue