summaryrefslogtreecommitdiffstats
path: root/src/import/import-raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/import-raw.c')
-rw-r--r--src/import/import-raw.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/import/import-raw.c b/src/import/import-raw.c
index ee9b297..78775b9 100644
--- a/src/import/import-raw.c
+++ b/src/import/import-raw.c
@@ -409,6 +409,11 @@ static int raw_import_process(RawImport *i) {
goto finish;
}
+ if ((size_t) l > sizeof(i->buffer) - i->buffer_size) {
+ r = log_error_errno(SYNTHETIC_ERRNO(EBADMSG), "Read input file exceeded maximum size.");
+ goto finish;
+ }
+
i->buffer_size += l;
if (i->compress.type == IMPORT_COMPRESS_UNKNOWN) {