-- Copyright (C) 2025 CEA - All Rights Reserved
-- 
-- This program is free software: you can redistribute it and/or modify it under
-- the terms of the GNU General Public License as published by the Free Software
-- Foundation, either version 3 of the License, or (at your option) any later
-- version.
-- 
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY
-- WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR
-- A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-- 
-- You should have received a copy of the GNU General Public License along with
-- this program.  If not, see <http://www.gnu.org/licenses/>.


local function overflow()
   local b = ''
   local number_strings = {}
   for i=1,0xffff do number_strings[i] = string.format("%08x", i) end
   b = table.concat(number_strings)
   for i=1, 2 do
      b = b .. b .. b .. b .. b .. b .. b .. b .. b .. b .. b .. b .. b .. b .. b .. b
   end

   local string_source = b;

   local evil = string.sub(string_source, 1, 58000000) .. "a" -- Note: '"' (1 byte) appended.
end

overflow()