[Libreoffice] [PUSHED] Crash in master: Sum button in sc

Kohei Yoshida kyoshida at novell.com
Wed Jan 26 17:28:52 PST 2011

On Wed, 2011-01-26 at 23:59 +0100, Soeren Moeller wrote:
> Thanks for the answer. I now used gdb to locate the segfault, and
> found it to happen when ScViewFunc called ScRangeList.front() with an
> empty range list, which resulted in a segfault while trying to
> retrieve the first element of the list. I have prepared the attached
> patch, adding a check for empty list in ScViewFunc. (As it here
> opposed to ScRangeList, was possible to check that not returning an
> element was handled ok.) This removes the crash, and the sum button
> seems to work fine again. Although it maybe still would make sense to
> check the other uses of ScRangeList.front() for similar problems, I
> will try to look into this later on, but this patch shoul at least
> make this use safe.

Good work, Soeren!  Very impressive. :-)

Needless to say that I've pushed your patch.  I only changed the bracket
style much our coding style, but I've committed the rest as-is.

And yes, let's hunt for other similar cases.  There may be more.


More information about the LibreOffice mailing list