[Libreoffice] [REVIEW] Fix for fdo#37226

Noel Power nopower at novell.com
Wed May 18 04:08:51 PDT 2011

On 17/05/11 17:04, Kohei Yoshida wrote:
> Hi there,
> The attached patch fixes the crasher reported in the following bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=37226
> and also several other usage of standard algorithms which I believe is
> incorrect, since the existing code passes the result of an evaluation
> which is always boolean (unless boost::bind overloads those operators to
> return something else, which I doubt it does).
I don't know much about boost, have seen the bind stuff peppered here 
and there in the code and generally liked the look of it, anyway your 
question prompted me to try and understand more, the following link 
http://www.boost.org/doc/libs/1_46_1/libs/bind/bind.html#operators seems 
to indicate that it is the operator is passed to the standard algorithm 
and not the result ( but maybe I misunderstood, this stuff is still 
unfamiliar to me )
>    There were several cases
> where such evaluation result was passed to standard algorithms, one of
> which caused the crash.
I tried your patch ( but with the bind bits left in ) and it seemed to 
work find for me ( especially wrt to the operator stuff above ) attached 
is the patch I used

-------------- next part --------------
A non-text attachment was scrubbed...
Name: with-bind.diff
Type: text/x-patch
Size: 1872 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110518/3404f397/attachment.bin>

More information about the LibreOffice mailing list