tDo not check streams shorter than a signature - sick - sign and check files using ed25519
(HTM) git clone git://z3bra.org/sick
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit e1ffd5fb0b6aa9e5a763e0f379efe45f69c2ca17
(DIR) parent 64c338df3e9e8f8e4d407f4fe1d1811ece190752
(HTM) Author: z3bra <contactatz3bradotorg>
Date: Mon, 13 Mar 2017 22:53:11 +0100
Do not check streams shorter than a signature
Diffstat:
M sick.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/sick.c b/sick.c
t@@ -186,7 +186,7 @@ extractsig(unsigned char **sig, char *buf, size_t len)
}
} else {
/* assume the signature is the last 64 bytes of the stream */
- if (memcpy((*sig), buf + len - 64, 64))
+ if (len > 64 && memcpy((*sig), buf + len - 64, 64))
siglen = 64;
}