Re: memory problem

From: Dave Townsend (datownsend_at_comcast.net)
Date: 07/17/04


Date: Fri, 16 Jul 2004 18:27:05 -0700


Just a guess, but perhaps your stack doesn't allow you to have
27 megs of space ? Perhaps you can allocate buffer with the
free store instead ( like buffer = new char[27meg] )

"Sean Bartholomew" <adrian@rivaband.com> wrote in message
news:b8a337c3.0407161630.45bbe093@posting.google.com...
> size = myTextFile.tellg();
> myTextFile.seekg (0, ios::beg);
> char buffer[size+1];
> myTextFile.read (buffer, size);
> myTextFile.close();
> buffer[size] = '\0';
>
> the above code works great and always worked great.
> now, i tried to apply it to a 27MB text file instead of the 300K one
> it was used to doing and i get a fault exception. i am 99% positive
> its the size of the file. which makes sense. but my entire program
> depends of the buffer containing the entire text for searching and
> extraction and parsing purposes.
> is there a way around this where i could search direct from the drive
> instead of a buffer?



Relevant Pages

  • Re: Passing buffer to a driver
    ... buffer I just allocated and passed to it by XXX_OemIoControl. ... allocate buffer on the stack I don't have this problem. ... on embedded pointers (your buffer is an embedded pointer because is ...
    (microsoft.public.windowsce.platbuilder)
  • memory problem
    ... char buffer; ... myTextFile.read (buffer, size); ... extraction and parsing purposes. ... is there a way around this where i could search direct from the drive ...
    (comp.lang.cpp)
  • [NEWS] How to Remotely and Automatically Exploit a Format Bug
    ... Exploiting a format bug remotely is not as difficult as one would think. ... We will use very minimalist server along this paper. ... Since the buffer is directly available to a malicious user, ... Guessing the address of the shellcode in the stack ...
    (Securiteam)
  • [NEWS] Multiple ValiCert Security Problems
    ... * Enterprise VA Host Server for processing validation requests VA API ... Multiple buffer overflows exist in the CGI script, forms.exe, which is ... Analysis of the code and stack contents reveals that the unchecked buffer ...
    (Securiteam)
  • [REVS] Buffer Overflow Exploitation and Prevention
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... you have to know what a buffer overflow is (we highly recommend reading ... to by `str' is too long, we smash, outside of the buffer, EBP (not always ... We'll have to appropriately prepare the stack in order for our ...
    (Securiteam)