Re: [Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-15 Thread Noel Power
Hi Caolan On 15/02/11 16:17, Noel Power wrote: On 15/02/11 15:28, Michael Meeks wrote: Which it doesn't, so good catch; Noel we should fix that :-) well as it turns out it does, rtl_string_ImplAlloc always creates a buffer 1 bigger than the requested len and stuffs a '\0' in it. Strange bu

Re: [Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-15 Thread Michael Meeks
On Tue, 2011-02-15 at 16:17 +, Noel Power wrote: > On 15/02/11 15:28, Michael Meeks wrote: > > Which it doesn't, so good catch; Noel we should fix that :-) > well as it turns out it does, rtl_string_ImplAlloc always creates a mea culpa :-) I was too quick, and forgot the char buf

Re: [Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-15 Thread Noel Power
On 15/02/11 15:28, Michael Meeks wrote: The original problem to be fixed is a lack of a zero terminator in the *output* blob, its just an issue of copying it from the original string or adding a new one, just making sure that if we go with copying it from the original string, that the original

Re: [Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-15 Thread Michael Meeks
On Tue, 2011-02-15 at 15:04 +, Caolán McNamara wrote: > Yes, ::insert don't dereference the final end iterator, but it does use Hah - quite right ;-) I only got past the double bluff to get suckered at the next fence; so this is duff; we should append getLength() and then push_back a

Re: [Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-15 Thread Caolán McNamara
On Tue, 2011-02-15 at 14:50 +, Michael Meeks wrote: > std::vector< char > * blob = data.newBlob(); > blob->insert(blob->begin(), str.getStr(), str.getStr() + str.getLength() + 1) > > As passint a char * start and end iterator to the stl insert. The end > iterator is not used, we terminat

Re: [Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-15 Thread Michael Meeks
On Tue, 2011-02-15 at 12:01 +, Caolán McNamara wrote: > Is it guaranteed that str is NULL terminated, i.e. getStr() has always > claimed that it might not actually be NULL terminated Right - it is not NULL terminated. Then again I read this: std::vector< char > * blob = data

Re: [Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-15 Thread Caolán McNamara
On Tue, 2011-02-15 at 12:42 +, Noel Power wrote: > yeah, I think we can pretty much assume that the strings are null > terminate Sure, +1 then. C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/

Re: [Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-15 Thread Noel Power
Hi Caolán On 15/02/11 12:01, Caolán McNamara wrote: Is it guaranteed that str is NULL terminated, i.e. getStr() has always claimed that it might not actually be NULL terminated, and this assumes a NULL terminator exists and can be pushed into blob. yeah, I think we can pretty much assume that th

Re: [Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-15 Thread Caolán McNamara
On Mon, 2011-02-14 at 20:08 +, Noel Power wrote: > (reposting with [PATCH] keyword > although the fix for this issue will appear from dev300m98 onwards it > would be worth I think getting this into > > a) libreoffice-3-3 ( one ack please ) > and possibly > b) libreoffice-3.3.1 ( 3 acks pl

[Libreoffice] [PATCH] fix for i#115716 & fdo#33964

2011-02-14 Thread Noel Power
(reposting with [PATCH] keyword although the fix for this issue will appear from dev300m98 onwards it would be worth I think getting this into a) libreoffice-3-3 ( one ack please ) and possibly b) libreoffice-3.3.1 ( 3 acks please ) I only mention 3.3.1 because there is a request in the bug