Commit bac69bc5 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Protect mgt_SHM_Alloc() with a couple of asserts.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4814 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a524b3cc
......@@ -70,6 +70,8 @@ mgt_SHM_Alloc(unsigned size, const char *type, const char *ident)
struct shmalloc *sha, *sha2;
unsigned seq;
ASSERT_MGT();
AN(loghead);
/* Round up to pointersize */
size += sizeof(sha) - 1;
size &= ~(sizeof(sha) - 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment