From f5d4d28b3038646b57ad3eaca4d28671c43105fe Mon Sep 17 00:00:00 2001 From: lanyuhang Date: Fri, 27 Apr 2018 15:17:19 +0800 Subject: [PATCH] fix(php inject) format specifiers --- agent/php/openrasp_inject.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/php/openrasp_inject.cc b/agent/php/openrasp_inject.cc index 1de0cce55..4baa053cd 100644 --- a/agent/php/openrasp_inject.cc +++ b/agent/php/openrasp_inject.cc @@ -73,9 +73,9 @@ PHP_RINIT_FUNCTION(openrasp_inject) { { auto time_point = std::chrono::steady_clock::now(); - long long unsigned int nano = time_point.time_since_epoch().count(); - auto hash = zend_inline_hash_func(reinterpret_cast(&nano), sizeof(nano)); - spprintf(&OPENRASP_INJECT_G(request_id), 32, "%016llx%016lx", hash, nano); + long long nano = time_point.time_since_epoch().count(); + unsigned long hash = zend_inline_hash_func(reinterpret_cast(&nano), sizeof(nano)); + spprintf(&OPENRASP_INJECT_G(request_id), 32, "%016lx%016llx", hash, nano); char *uuid_header = nullptr; int uuid_header_len = spprintf(&uuid_header, 0, "X-Request-ID: %s", OPENRASP_INJECT_G(request_id)); if (uuid_header)