Software /
code /
prosody
Changeset
5929:e6d5956d05e6
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 28 Nov 2013 16:17:51 +0100 |
parents | 5926:4fd1e660744d (current diff) 5928:1f6923702fc3 (diff) |
children | 5932:d0e74450968f |
files | |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util-src/pposix.c Sun Nov 24 14:24:53 2013 +0100 +++ b/util-src/pposix.c Thu Nov 28 16:17:51 2013 +0100 @@ -676,6 +676,8 @@ { 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);