Results 1 to 1 of 1

Thread: Presumed buffer overflow when printing/logging very long lines

  1. #1
    Lesser Knight
    Join Date
    Dec 2006
    Location
    United States
    Posts
    47

    Default Presumed buffer overflow when printing/logging very long lines

    now I will hax your computer with my mad skillz!1

    I accidentally caused Novashell to crash (from what I assume is a buffer overflow) when print()ing a very large string (4046 characters or more).

    Code:
    function MakeAReallyHonkingBigStringMan(ginormousness)
        local result = ""
        for i = 1, ginormousness do
            result = result .. "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -- 64 exes
        end
        return result
    end
    
    MakeAReallyHonkingBigStringMan(63) -- no crash
    MakeAReallyHonkingBigStringMan(64) -- CRASH
    (I was actually printing a table at the time, but this should work too.)

    D'oh, I just realized that I could have used string.rep() had I known it existed at the time. Oh well.
    Last edited by Ian; 01-09-2007 at 05:44 AM.

Similar Threads

  1. Long time
    By in forum RTsoft Tavern
    Replies: 0
    Last Post: 11-21-2005, 06:10 AM
  2. How long does it take
    By Mugombie in forum Funeral Quest
    Replies: 1
    Last Post: 05-01-2004, 10:45 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •