diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-18 13:33:14 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-18 13:33:14 -0300 |
commit | 93d3c8450c7a78321cf7f9db9173d46c62ebe958 (patch) | |
tree | ba2626af9edbf90afdb02edb836020c693742d99 /bugs | |
parent | 8667f29c3b9e56fb6bd4f9de8c096e0331be555d (diff) | |
download | lua-github-93d3c8450c7a78321cf7f9db9173d46c62ebe958.tar.gz |
bug: string.format("%") reads past the string
Diffstat (limited to 'bugs')
-rw-r--r-- | bugs | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -798,6 +798,32 @@ patch = [[ } +Bug{ +what = [[Some "not not exp" may not result in boolean values]], +report = [[]], +since = [[4.0]], +example = [[ +-- should print false, but prints nil +print(not not (nil and 4)) +]], +patch = [[]], +} + + +Bug{ +what = [[On some machines, closing a "piped file" (created with io.popen) +may crash Lua]], +report = [[]], +since = [[5.0]], +example = [[ +-- only on some machines + f = io.popen("ls") + f:close() +]], +patch = [[]], +} + + ----------------------------------------------------------------- -- Lua 5.1 @@ -1095,3 +1121,31 @@ patch = [[ ]], } + + +Bug{ +what = [[string.format("%") reads past the string]], +report = [[Roberto, on 09/2006]], +since = [[5.0 (at least)]], +example = [[print(string.format("%"))]], +patch = [[ +*lstrlib.c: +@@ -723,7 +723,7 @@ + + static const char *scanformat (lua_State *L, const char *strfrmt, char *form) { const char *p = strfrmt; +- while (strchr(FLAGS, *p)) p++; /* skip flags */ ++ while (*p != '\0' && strchr(FLAGS, *p) != NULL) p++; /* skip flags */ + if ((size_t)(p - strfrmt) >= sizeof(FLAGS)) + luaL_error(L, "invalid format (repeated flags)"); + if (isdigit(uchar(*p))) p++; /* skip width */ +]], +} + + +Bug{ +what = [[ ]], +report = [[ ]], +since = [[ ]], +example = [[ ]], +patch = [[ ]], +} |