diff options
Diffstat (limited to 'src/input/filter.c')
-rw-r--r-- | src/input/filter.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/input/filter.c b/src/input/filter.c index f40c98f..4a7cd7f 100644 --- a/src/input/filter.c +++ b/src/input/filter.c @@ -204,6 +204,16 @@ parserutils_error parserutils_filter_process_chunk(parserutils_filter *input, if (ret != (size_t) -1 || errno != EILSEQ) break; + if (*outlen < 3) + return PARSERUTILS_NOMEM; + + (*output)[0] = 0xef; + (*output)[1] = 0xbf; + (*output)[2] = 0xbd; + + *output += 3; + *outlen -= 3; + (*data)++; (*len)--; } |