Browse Source

Do not accept zero sized maps.

tags/0.9.0
Vsevolod Stakhov 9 years ago
parent
commit
a24b1306ff
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/libutil/map.c

+ 5
- 3
src/libutil/map.c View File

gchar *pos; gchar *pos;
struct rspamd_map *map; struct rspamd_map *map;


if (msg->code != 200) {
if (msg->code != 200 || len == 0) {
/* Ignore not full replies */ /* Ignore not full replies */
return 0; return 0;
} }


close (fd); close (fd);


map->fin_callback (map->pool, &cbdata);
*map->user_data = cbdata.cur_data;
if (rlen > 0) {
map->fin_callback (map->pool, &cbdata);
*map->user_data = cbdata.cur_data;
}
} }


static void static void

Loading…
Cancel
Save