summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/pgp-compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/pgcrypto/pgp-compress.c')
-rw-r--r--contrib/pgcrypto/pgp-compress.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/pgcrypto/pgp-compress.c b/contrib/pgcrypto/pgp-compress.c
index 0505bdee923..17f5b2ef93d 100644
--- a/contrib/pgcrypto/pgp-compress.c
+++ b/contrib/pgcrypto/pgp-compress.c
@@ -243,6 +243,17 @@ decompress_read(void *priv, PullFilter *src, int len,
struct DecomprData *dec = priv;
restart:
+ if (dec->stream.avail_in == 0)
+ {
+ uint8 *tmp;
+
+ res = pullf_read(src, 8192, &tmp);
+ if (res < 0)
+ return res;
+ dec->stream.next_in = tmp;
+ dec->stream.avail_in = res;
+ }
+
if (dec->buf_data > 0)
{
if (len > dec->buf_data)
@@ -256,17 +267,6 @@ restart:
if (dec->eof)
return 0;
- if (dec->stream.avail_in == 0)
- {
- uint8 *tmp;
-
- res = pullf_read(src, 8192, &tmp);
- if (res < 0)
- return res;
- dec->stream.next_in = tmp;
- dec->stream.avail_in = res;
- }
-
dec->stream.next_out = dec->buf;
dec->stream.avail_out = dec->buf_len;
dec->pos = dec->buf;