From 373ca15c71db979c2b072e6521cec36bb792e0fa Mon Sep 17 00:00:00 2001 From: John Reiser Date: Sun, 10 May 2015 14:01:08 -0700 Subject: [PATCH] size < 1024 is too short --- src/work.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/work.cpp b/src/work.cpp index ded5a8b0..1d3799ef 100644 --- a/src/work.cpp +++ b/src/work.cpp @@ -81,6 +81,8 @@ void do_one_file(const char *iname, char *oname) #endif if (st.st_size <= 0) throwIOException("empty file -- skipped"); + if (st.st_size < 1024) + throwIOException("file is too small -- skipped"); if (st.st_size >= 1024*1024*1024) throwIOException("file is too large -- skipped"); if ((st.st_mode & S_IWUSR) == 0)