summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--byterun/md5.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/byterun/md5.c b/byterun/md5.c
index 31a54e011..6ab81b8ac 100644
--- a/byterun/md5.c
+++ b/byterun/md5.c
@@ -42,6 +42,7 @@ value md5_chan(vchan, len) /* ML */
long toread, read;
char buffer[4096];
+ Lock(chan);
MD5Init(&ctx);
toread = Long_val(len);
while (toread > 0) {
@@ -53,6 +54,7 @@ value md5_chan(vchan, len) /* ML */
}
res = alloc_string(16);
MD5Final(&Byte_u(res, 0), &ctx);
+ Unlock(chan);
return res;
}