REPOSITORY
  rL LLVM

================
Comment at: /Users/vharron/ll/svn/lldb/source/Utility/UriParser.cpp:42
@@ -42,1 +41,3 @@
+    char* end = nullptr;
     int port_tmp = strtoul(port_buf, &end, 10);
+    if (*end != 0 || port_tmp > 65535)
----------------
You may define port_tmp as auto instead of integer - otherwise if result of 
strtoul is greater than MAX_INT but less than max of unsigned long int it might 
be just a negative number.

================
Comment at: /Users/vharron/ll/svn/lldb/source/Utility/UriParser.cpp:43
@@ -42,3 +42,3 @@
     int port_tmp = strtoul(port_buf, &end, 10);
-    if (*end != 0)
+    if (*end != 0 || port_tmp > 65535)
     {
----------------
Check for portr_tmp <= 0?

http://reviews.llvm.org/D6918

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to