]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tests/CapturingStoreEntry.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / tests / CapturingStoreEntry.h
index 0c3a4073f5712401640f1b23ee878386c069de16..655d7446c3d399981b18d6f93ef3523fda33f274 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -33,6 +33,8 @@ public:
     }
 
     virtual void append(char const * buf, int len) {
+        if (!buf || len < 0) // old 'String' can't handle these cases
+            return;
         _appended_text.append(buf, len);
     }
 };