]> err.no Git - varnish/commitdiff
Don't allocate space for a %u and then stick a %d in it.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 12 Sep 2008 09:39:35 +0000 (09:39 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 12 Sep 2008 09:39:35 +0000 (09:39 +0000)
Tripped by: anordby

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3183 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_vrt.c

index 5dedccfffb7918e212977caa6b0601c17886877b..891106a6c457e355eff17036b929b115a5ab11c5 100644 (file)
@@ -480,7 +480,7 @@ VRT_r_req_xid(struct sess *sp)
 
        size = snprintf(NULL, 0, "%u", sp->xid) + 1;
        AN(p = WS_Alloc(sp->http->ws, size));
-       assert(snprintf(p, size, "%d", sp->xid) < size);
+       assert(snprintf(p, size, "%u", sp->xid) < size);
        return (p);
 }