lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> cd lua-2.1 && make all
> ./lua test.lua
> *** buffer overflow detected ***: ./lua terminated

The relevant code is

  *node = (TreeNode *) luaI_malloc(sizeof(TreeNode)+strlen(str));
  strcpy((*node)->ts.str, str);

strcpy becomes __builtin___strcpy_chk. It seems that the "buffer
overflow" is due to the compiler thinking no space has been allocated
to (*node)->ts.str.