Hi Scuri,
You're welcome.

Best.
Ranier Vilela
________________________________________
De: Antonio Scuri <antonio.sc...@gmail.com>
Enviado: sábado, 20 de janeiro de 2018 16:19
Para: IUP discussion list.
Assunto: Re: [Iup-users] CID 210590 (#1 of 1): Infinite loop (INFINITE_LOOP)

  The third report was a serious bug... Thanks.

  Fixed and committed to SVN.

Best,
Scuri


2018-01-19 16:20 GMT-02:00 Ranier VF 
<ranier_...@hotmail.com<mailto:ranier_...@hotmail.com>>:
Hi,
Multiple issues found by Coverity Scan.

CID 210502 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
CID 210590 (#1 of 1): Infinite loop (INFINITE_LOOP)
CID 210665 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)

--- a\srcscintilla\iup_scintilladlg.c   Fri Jan 19 16:00:51 2018
+++ b\srcscintilla\iup_scintilladlg.c   Fri Jan 19 16:17:11 2018
@@ -299,6 +299,11 @@
   int tabSize = IupGetInt(multitext, "TABSIZE");
   int lin, col, i, j;

+  if (tabSize == 0)
+  {
+     return;
+  }
+
   for (i = count - 1; i >= 0; i--)
   {
     int spacesToNextTab;
@@ -325,6 +330,11 @@
   int tabSize = IupGetInt(multitext, "TABSIZE");
   int lin, col, i;

+  if (tabSize == 0)
+  {
+     return;
+  }
+
   for (i = count - 1; i >= 0; i--)
   {
     int nSpaces, tabStop;
@@ -591,7 +601,7 @@
   int i;

   /* clear everything before saving */
-  for (i = 1; i <= count; count++)
+  for (i = 1; i <= count; i++)
     IupConfigSetVariableStrId(projectConfig, "ProjectFiles", "File", i, NULL);
   IupConfigSetVariableStr(projectConfig, "ProjectFiles", "Count", NULL);

Best.
Ranier
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net<mailto:Iup-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/iup-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to