From 7ca34b04c0915cb00345afa1ba7cfc736f82f9a1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 6 Nov 2014 13:47:59 +0000 Subject: coverity#735645 Division or modulo by zero Change-Id: I03b8404f90b6a05189591d8e3423f32810057a47 --- sw/source/filter/xml/xmltbli.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index fdc0bbc0c045..fb3ed88064a6 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -2446,6 +2447,8 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox ) { if( !colIter->isRelative ) { + if (nMinAbsColWidth == 0) + throw o3tl::divide_by_zero(); sal_Int32 nRelCol = ( colIter->width * nMinRelColWidth) / nMinAbsColWidth; colIter->width = nRelCol; colIter->isRelative = true; -- cgit