Skip to content

Commit

Permalink
fix(php inject) format specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
spacelan committed Apr 27, 2018
1 parent da2a78a commit f5d4d28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agent/php/openrasp_inject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<const char *>(&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<const char *>(&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)
Expand Down

0 comments on commit f5d4d28

Please sign in to comment.