]> granicus.if.org Git - libevent/commit
Fix UB in evutil_date_rfc1123()
authorAzat Khuzhin <a3at.mail@gmail.com>
Mon, 19 Dec 2016 07:22:51 +0000 (10:22 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Thu, 22 Dec 2016 11:46:38 +0000 (14:46 +0300)
commit4545807db421e562782db2701fe5d3bfb9e2c1a4
tree00b7f99bbfc7a0be674f44070dbb0ec1bd1b083c
parent68def4352c270fe597d3253b3e20cbe974e2f7d5
Fix UB in evutil_date_rfc1123()

As pointed in https://github.com/libevent/libevent/pull/417#issuecomment-267860738
  "code is unsafe because in evutil_date_rfc1123() the pointer to the
  automatic variable struct tm cur is used outside the scope it defined."

Checked with `clang -fsanitize=address -fsanitize-address-use-after-scope`
and test that call evutil_date_rfc1123() with tm==NULL
evutil_time.c
include/event2/util.h
test/regress_util.c