You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2017/05/14 01:39:52 UTC
[trafficserver] branch master updated: Coverity CID #1021966
Dereference after null check
This is an automated email from the ASF dual-hosted git repository.
sorber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 6c1758c Coverity CID #1021966 Dereference after null check
6c1758c is described below
commit 6c1758c384ed9e65d7ebd37ea7d62cf181198185
Author: Phil Sorber <so...@apache.org>
AuthorDate: Thu May 11 21:41:47 2017 -0600
Coverity CID #1021966 Dereference after null check
---
proxy/InkAPI.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index ac0c818..118e7c2 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -931,7 +931,9 @@ FileImpl::fgets(char *buf, int length)
if (!m_buf || (m_bufpos < (length - 1))) {
pos = m_bufpos;
- fread(nullptr, length - 1);
+ if (fread(nullptr, length - 1) < 0) {
+ return nullptr;
+ }
if (!m_bufpos && (pos == m_bufpos)) {
return nullptr;
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].