[master] 935b6bad4 Polish

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri Nov 29 07:07:08 UTC 2019


commit 935b6bad4b7b58a254e4b3dcbd4f9ac7409abd67
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Fri Nov 29 07:44:27 2019 +0100

    Polish

diff --git a/lib/libvcc/vcc_symb.c b/lib/libvcc/vcc_symb.c
index 3ef753220..4bb0a72a7 100644
--- a/lib/libvcc/vcc_symb.c
+++ b/lib/libvcc/vcc_symb.c
@@ -113,10 +113,8 @@ vcc_dup_be(const char *b, const char *e)
 	AN(e);
 	assert(e >= b);
 
-	p = malloc((e - b) + 1);
+	p = strndup(b, e - b);
 	AN(p);
-	memcpy(p, b, e - b);
-	p[e - b] = '\0';
 	return (p);
 }
 


More information about the varnish-commit mailing list