gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] /srv/bzr/gnash/trunk r11776: we need to make the stri


From: strk
Subject: Re: [Gnash-commit] /srv/bzr/gnash/trunk r11776: we need to make the string one character larger to keep valgrind happy.
Date: Wed, 20 Jan 2010 17:48:37 +0100

On Wed, Jan 20, 2010 at 09:05:38AM -0700, Rob Savoye wrote:
> On 01/20/10 08:58, strk wrote:
> 
> > If valgrind was not happy above it means that the string in your buffer 
> > wasn't NULL-terminated. By passing a second argument to std::string 
> > constructor
> > you instruct it to stop after reading those many bytes, no matter 
> > null-termination.
> 
>   It is not a NULL terminated string, it's raw data that just happens to
> contain ASCII text, so the fix is correct, as constructing a string was
> trying to read the non-existent NULL byte.

Yeah, I figured. My question was more of: is it correct to read buf->size()+1 
bytes
rather than buf->size() bytes ?

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://foo.keybit.net/~strk/services.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]