On Thu, Dec 30, 2010 at 06:43:12PM +0100, Julien Nabet wrote:
> Hello,
> 
> Here is a patch for cppcheck cleaning in vcl
> Compiling was ok.
> 
> I'm not sure if what I did about realloc pb in the file :
> vcl/unx/source/gdi/xlfd_attr.cxx
> was sufficient (even correct !).

If Enlarge() failed, Insert() silently returns whatever value
mnLastmatch happened to be, that means that you replaced possible
segfault with possible wrong behaviour :( IMHO the right thing here is
to throw std::bad_alloc if the reallocation failed and I changed the
patch accordingly.

D.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to