aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-08-29 13:50:02 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-08-29 13:50:02 -0300
commit994a37c8e88d090421afb7ca639f01f868708452 (patch)
tree4e5d18829ef542e2f32c69dd3fe4af0c918a1e9e
parent0ff1596476f7e3f65cd5505d148d43baf58fbaac (diff)
downloadlua-994a37c8e88d090421afb7ca639f01f868708452.tar.gz
lua-994a37c8e88d090421afb7ca639f01f868708452.tar.bz2
lua-994a37c8e88d090421afb7ca639f01f868708452.zip
IBM AS400 (OS400) has sizeof(void *)==16, and a `%p' may generate
up to 60 characters in a `printf'. That causes a buffer overflow in `tostring'..
-rw-r--r--bugs28
1 files changed, 26 insertions, 2 deletions
diff --git a/bugs b/bugs
index 9e9df19b..d202ee22 100644
--- a/bugs
+++ b/bugs
@@ -445,13 +445,13 @@ for i=1,10000000 do
445end 445end
446]], 446]],
447patch = [[ 447patch = [[
448*lgc.h: 448* lgc.h:
44918c18 44918c18
450< void luaC_separateudata (lua_State *L); 450< void luaC_separateudata (lua_State *L);
451--- 451---
452> size_t luaC_separateudata (lua_State *L); 452> size_t luaC_separateudata (lua_State *L);
453 453
454*lgc.c: 454* lgc.c:
455113c113,114 455113c113,114
456< void luaC_separateudata (lua_State *L) { 456< void luaC_separateudata (lua_State *L) {
457--- 457---
@@ -489,4 +489,28 @@ patch = [[
489--- 489---
490> checkSizes(L, deadmem); 490> checkSizes(L, deadmem);
491]] 491]]
492}
493
494Bug{
495what=[[IBM AS400 (OS400) has sizeof(void *)==16, and a `%p' may generate
496up to 60 characters in a `printf'. That causes a buffer overflow in
497`tostring'.]],
492 498
499report = [[David Burgess, 25/08/2003]],
500
501example = [[print{}; (in an AS400 machine)]],
502
503patch = [[
504* liolib.c:
505178c178
506< char buff[32];
507---
508> char buff[128];
509
510* lbaselib.c:
511327c327
512< char buff[64];
513---
514> char buff[128];
515]]
516}