[PC-BSD Commits] r17667 - pcbsd/current/src-qt4/libpcbsd

svn at pcbsd.org svn at pcbsd.org
Fri Jul 6 09:42:52 PDT 2012


Author: kris
Date: 2012-07-06 16:42:52 +0000 (Fri, 06 Jul 2012)
New Revision: 17667

Modified:
   pcbsd/current/src-qt4/libpcbsd/utils.cpp
Log:

Make sure ipv4 addresses dont have .00000. or some other craziness



Modified: pcbsd/current/src-qt4/libpcbsd/utils.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/utils.cpp	2012-07-06 16:31:45 UTC (rev 17666)
+++ pcbsd/current/src-qt4/libpcbsd/utils.cpp	2012-07-06 16:42:52 UTC (rev 17667)
@@ -816,6 +816,9 @@
      if ( IP.section(".", i, i).isEmpty() )
         return false;
 
+     if ( IP.section(".", i, i).size() > 3 )
+        return false;
+
      num = IP.section(".", i,i).toInt(&ok);
      if (!ok)
         return false;



More information about the Commits mailing list