瀏覽代碼

'string.format' may get buffer as an argument when there are
missing arguments and format string is too long

Roberto Ierusalimschy 15 年之前
父節點
當前提交
8003e9544d
共有 1 個文件被更改,包括 14 次插入2 次删除
  1. 14 2
      bugs

+ 14 - 2
bugs

@@ -1880,8 +1880,8 @@ patch = [[
 +++ lundump.c   2008/04/04 19:51:41     2.7.1.4
 +++ lundump.c   2008/04/04 19:51:41     2.7.1.4
 @@ -1,5 +1,5 @@
 @@ -1,5 +1,5 @@
  /*
  /*
--** $Id: bugs,v 1.104 2009/08/05 13:09:38 roberto Exp roberto $
-+** $Id: bugs,v 1.104 2009/08/05 13:09:38 roberto Exp roberto $
+-** $Id: bugs,v 1.105 2009/11/23 14:59:30 roberto Exp roberto $
++** $Id: bugs,v 1.105 2009/11/23 14:59:30 roberto Exp roberto $
  ** load precompiled Lua chunks
  ** load precompiled Lua chunks
  ** See Copyright Notice in lua.h
  ** See Copyright Notice in lua.h
  */
  */
@@ -2257,3 +2257,15 @@ patch = [[
 ]]
 ]]
 }
 }
 
 
+Bug{
+what = [['string.format' may get buffer as an argument when there are
+missing arguments and format string is too long]],
+report = [[Roberto I., 2010/04/12]],
+since = [[5.0]],
+example = [[
+x = string.rep("x", 10000) .. "%d"
+print(string.format(x))    -- gives wrong error message
+patch = [[
+]]
+}
+