[master] 93a6c4c Report error in STV_FileSize on empty file and no size specified
Martin Blix Grydeland
martin at varnish-software.com
Tue Oct 21 12:25:42 CEST 2014
commit 93a6c4ca01994babecee152704178f50e2f2b6eb
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Tue Oct 7 12:44:37 2014 +0200
Report error in STV_FileSize on empty file and no size specified
diff --git a/bin/varnishd/storage/stevedore_utils.c b/bin/varnishd/storage/stevedore_utils.c
index e30cbcc..359b5ea 100644
--- a/bin/varnishd/storage/stevedore_utils.c
+++ b/bin/varnishd/storage/stevedore_utils.c
@@ -196,6 +196,9 @@ STV_FileSize(int fd, const char *size, unsigned *granularity, const char *ctx)
* use its existing size.
*/
l = st.st_size;
+ } else if (size == NULL || *size == '\0') {
+ ARGV_ERR("(%s) no size specified\n",
+ ctx);
} else {
AN(size);
q = VNUM_2bytes(size, &l, fssize);
More information about the varnish-commit
mailing list