[
https://issues.apache.org/jira/browse/THRIFT-4140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15951522#comment-15951522
]
ASF GitHub Bot commented on THRIFT-4140:
----------------------------------------
GitHub user jeking3 opened a pull request:
https://github.com/apache/thrift/pull/1231
THRIFT-4140: fix unsafe call to gmtime
I took the patch from the Jira entry and made it work on both unix and
windows.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jeking3/thrift THRIFT-4140
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1231.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1231
----
commit 23c73c32d98c12283cbd5acf225e08bccbcd8393
Author: James E. King, III <[email protected]>
Date: 2017-03-31T19:02:51Z
THRIFT-4140: fix unsafe call to gmtime
----
> Use of non-thread-safe function gmtime()
> ----------------------------------------
>
> Key: THRIFT-4140
> URL: https://issues.apache.org/jira/browse/THRIFT-4140
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.10.0
> Reporter: Adriaan Schmidt
> Assignee: James E. King, III
> Priority: Minor
> Attachments: THRIFT-4140.patch
>
>
> Method *THttpServer::getTimeRFC1123()* (in
> lib/cpp/src/thr8ft/transport/THttpServer.cpp) uses gmtime().
> This function is documented to be not thread-safe
> (https://www.gnu.org/software/libc/manual/html_node/Broken_002ddown-Time.html).
> Instead, we should use gmtime_r().
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)