projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
033db22
)
In RAND_write_file, truncate the file to the no. of bytes written
author
Bodo Möller
<bodo@openssl.org>
Fri, 21 Jan 2000 17:11:26 +0000
(17:11 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Fri, 21 Jan 2000 17:11:26 +0000
(17:11 +0000)
(we're now using fopen(..., "rb+") instead of fopen(..., "wb"),
so the file is not truncated automatically).
crypto/rand/randfile.c
patch
|
blob
|
history
diff --git
a/crypto/rand/randfile.c
b/crypto/rand/randfile.c
index f95ecb0e00b4cb59c16d2e5277187a4721ba2d93..cf98643d3c778b5a5a1a6f043ab5d01a204c27fe 100644
(file)
--- a/
crypto/rand/randfile.c
+++ b/
crypto/rand/randfile.c
@@
-167,6
+167,8
@@
int RAND_write_file(const char *file)
ret+=i;
if (n <= 0) break;
}
+ if (ret > 0)
+ ftruncate(fileno(out), ret);
fclose(out);
memset(buf,0,BUFSIZE);
err: