projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mod_http: Use hostname from the correct context (thanks gryffus)
[prosody.git]
/
util-src
/
pposix.c
diff --git
a/util-src/pposix.c
b/util-src/pposix.c
index 7f64038beb3bd07bd353396ee47de4502e1db0b8..4fb1fb56b5346f062d9310b70a8788c177320a09 100644
(file)
--- a/
util-src/pposix.c
+++ b/
util-src/pposix.c
@@
-666,6
+666,8
@@
int lc_fallocate(lua_State* L)
{
off_t offset, len;
FILE *f = *(FILE**) luaL_checkudata(L, 1, LUA_FILEHANDLE);
+ if (f == NULL)
+ luaL_error(L, "attempt to use a closed file");
offset = luaL_checkinteger(L, 2);
len = luaL_checkinteger(L, 3);