403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.217.39
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/devel/boost-libs/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/devel/boost-libs/files/patch-libs_stacktrace_build_has__addr2line.cpp
Don't overflow return value from main()

--- libs/stacktrace/build/has_addr2line.cpp.orig	2017-07-10 14:19:05 UTC
+++ libs/stacktrace/build/has_addr2line.cpp
@@ -4,22 +4,24 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#include <cstdlib>
 #include <string>
 
 #include <boost/config.hpp>
-#include <unwind.h>
-#include <sys/types.h>
-#include <sys/wait.h>
+#ifdef BOOST_MSVC
+#include <io.h>
+#define X_OK 4
+#define access _access
+#else
+#include <unistd.h>
+#endif
 
 int main() {
 
 #ifdef BOOST_STACKTRACE_ADDR2LINE_LOCATION
     std::string s = BOOST_STRINGIZE( BOOST_STACKTRACE_ADDR2LINE_LOCATION );
-    s += " -h";
 #else
-    std::string s = "/usr/bin/addr2line -h";
+    std::string s = "/usr/bin/addr2line";
 #endif
 
-    return std::system(s.c_str());
+    return ::access(s.c_str(), X_OK) == -1;
 }

Youez - 2016 - github.com/yon3zu
LinuXploit