summaryrefslogtreecommitdiffstats
path: root/fb-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'fb-helper.c')
-rw-r--r--fb-helper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fb-helper.c b/fb-helper.c
index ee6fe60..03c200c 100644
--- a/fb-helper.c
+++ b/fb-helper.c
@@ -277,6 +277,12 @@ int main(int argc, char *argv[])
goto cleanup;
}
+ if (data_size == 0) {
+ fprintf(stderr, "Error: skipping 0-byte file: \"%s\"\n", file);
+ ret = 1;
+ goto cleanup;
+ }
+
forms[0].option = CURLFORM_BUFFER;
forms[0].value = basename(file);
forms[1].option = CURLFORM_BUFFERPTR;