aboutsummaryrefslogtreecommitdiffstats
path: root/src/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map.c b/src/map.c
index d250970b1..f878e59b1 100644
--- a/src/map.c
+++ b/src/map.c
@@ -189,7 +189,7 @@ static int
read_chunk_header (u_char *buf, size_t len, struct http_map_data *data)
{
u_char chunkbuf[32], *p, *c;
- int skip;
+ int skip = 0;
p = chunkbuf;
c = buf;
@@ -280,6 +280,9 @@ read_http_common (struct rspamd_map *map, struct http_map_data *data, struct htt
memmove (buf, remain, rlen);
r = rlen;
}
+ if (r <= 0) {
+ return TRUE;
+ }
if (reply->parser_state == 6) {
if (reply->code != 200 && reply->code != 304) {
msg_err ("read_http: got error reply from server %s, %d", data->host, reply->code);