[master] 4f763c79f SQUASHME: assert

Nils Goroll nils.goroll at uplex.de
Fri Oct 9 17:46:06 UTC 2020


commit 4f763c79f98f2131b4f61efe9ba5242ab363afe2
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Oct 8 10:57:59 2020 +0200

    SQUASHME: assert

diff --git a/lib/libvarnishapi/vsl_cursor.c b/lib/libvarnishapi/vsl_cursor.c
index bb79dc9b3..a9d83de36 100644
--- a/lib/libvarnishapi/vsl_cursor.c
+++ b/lib/libvarnishapi/vsl_cursor.c
@@ -456,10 +456,14 @@ static enum vsl_check v_matchproto_(vslc_check_f)
 vslc_mmap_check(const struct VSL_cursor *cursor, const struct VSLC_ptr *ptr)
 {
 	struct vslc_mmap *c;
+	const char *t;
 
 	CAST_OBJ_NOTNULL(c, cursor->priv_data, VSLC_MMAP_MAGIC);
 	assert(&c->cursor == cursor);
 	AN(ptr->ptr);
+	t = TRUST_ME(ptr->ptr);
+	assert(t > c->b);
+	assert(t <= c->e);
 	return (vsl_check_valid);
 }
 


More information about the varnish-commit mailing list