diff options
author | pancake <pancake@flubox> | 2008-12-19 19:39:27 +0100 |
---|---|---|
committer | pancake <pancake@flubox> | 2008-12-19 19:39:27 +0100 |
commit | a6ef73359c0e0537ebf83795ebacbbfaee2c9c28 (patch) | |
tree | 1db2cc7c531927be96c581e4077500918ad45ac4 /src/hash.c | |
parent | 3a1053b29e5fb8109463259ee9dff3d8f4e4be5b (diff) | |
download | 0xFFFF-a6ef73359c0e0537ebf83795ebacbbfaee2c9c28.tar.bz2 |
* Apply security patches from Erik Hovland - Thanks!
Diffstat (limited to 'src/hash.c')
-rw-r--r-- | src/hash.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -40,8 +40,10 @@ usho do_hash_file(const char *filename) } do { ret = fread(&buf, 1, BSIZE, fd); - if (ret == -1) + if (ret == -1) { + fclose(fd); return 0; + } hash ^= do_hash((usho *)&buf, ret); } while(ret); |