trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudhe...@apache.org
Subject [1/3] trafficserver git commit: [TS-3294] Add null pointer check
Date Fri, 23 Jan 2015 16:35:10 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 4f043934c -> 1d19318b0


[TS-3294] Add null pointer check

Coverity CID:1021868


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b62ea0c9
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b62ea0c9
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b62ea0c9

Branch: refs/heads/master
Commit: b62ea0c9c80f8dad41a62253bc1fd7b1d97b22e6
Parents: 4f04393
Author: Sudheer Vinukonda <sudheerv@yahoo-inc.com>
Authored: Fri Jan 23 16:32:22 2015 +0000
Committer: Sudheer Vinukonda <sudheerv@yahoo-inc.com>
Committed: Fri Jan 23 16:32:22 2015 +0000

----------------------------------------------------------------------
 proxy/hdrs/HdrTest.cc | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b62ea0c9/proxy/hdrs/HdrTest.cc
----------------------------------------------------------------------
diff --git a/proxy/hdrs/HdrTest.cc b/proxy/hdrs/HdrTest.cc
index 1ff196c..d7186fa 100644
--- a/proxy/hdrs/HdrTest.cc
+++ b/proxy/hdrs/HdrTest.cc
@@ -608,6 +608,12 @@ HdrTest::test_mime()
   StrList slist;
 
   cc_field = hdr.field_find("Cache-Control", 13);
+
+  if (cc_field == NULL) {
+    printf("FAILED: missing Cache-Control header\n\n");
+    return (failures_to_status("test_mime", 1));
+  }
+
   // TODO: Do we need to check the "count" returned?
   cc_field->value_get_comma_list(&slist); // FIX: correct usage?
 


Mime
View raw message