diff options
author | Henrik Nord <[email protected]> | 2011-04-28 14:20:15 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-04-28 14:20:22 +0200 |
commit | ad782e7f082aa25593346268be5b19b35db2a5ec (patch) | |
tree | 01a5056f26b462a9519b9d37ff2a5ba127377ddc /erts/emulator/drivers/common/gzio.c | |
parent | aacbae9180c757f7034b2840d4d2091a8ef3ea4a (diff) | |
parent | b9e8506d802d7548e5573af5d38513a44ea7f8bd (diff) | |
download | otp-ad782e7f082aa25593346268be5b19b35db2a5ec.tar.gz otp-ad782e7f082aa25593346268be5b19b35db2a5ec.tar.bz2 otp-ad782e7f082aa25593346268be5b19b35db2a5ec.zip |
Merge branch 'ms/file-fix-hang-reading-compressed-files' into dev
* ms/file-fix-hang-reading-compressed-files:
file: fix hang reading compressed files
OTP-9245
Diffstat (limited to 'erts/emulator/drivers/common/gzio.c')
-rw-r--r-- | erts/emulator/drivers/common/gzio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/drivers/common/gzio.c b/erts/emulator/drivers/common/gzio.c index 5531a275ea..741cb6ae20 100644 --- a/erts/emulator/drivers/common/gzio.c +++ b/erts/emulator/drivers/common/gzio.c @@ -632,6 +632,7 @@ erts_gzseek(gzFile file, int offset, int whence) while (s->position < pos) { char buf[512]; int n; + int save_pos = s->position; n = pos - s->position; if (n > sizeof(buf)) @@ -643,6 +644,7 @@ erts_gzseek(gzFile file, int offset, int whence) memset(buf, '\0', n); erts_gzwrite(file, buf, n); } + if (save_pos == s->position) break; } return s->position; |