mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 17:40:11 +01:00
Reset buffer in make_digests()
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
ca7c65b84a
commit
cb56eaeaed
@ -48,6 +48,7 @@ int make_digests(struct session_data *sdata, struct config *cfg){
|
|||||||
fd = open(sdata->filename, O_RDONLY);
|
fd = open(sdata->filename, O_RDONLY);
|
||||||
if(fd == -1) return -1;
|
if(fd == -1) return -1;
|
||||||
|
|
||||||
|
memset(buf, 0, sizeof(buf));
|
||||||
|
|
||||||
while((n = read(fd, buf, sizeof(buf))) > 0){
|
while((n = read(fd, buf, sizeof(buf))) > 0){
|
||||||
SHA256_Update(&context2, buf, n);
|
SHA256_Update(&context2, buf, n);
|
||||||
|
Loading…
Reference in New Issue
Block a user