Commit f7b3ef74 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland Committed by Lasse Karstensen

Report error in STV_FileSize on empty file and no size specified

parent 795bc31f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment