Skip to content

Commit d43e225

Browse files
committed
Size pool name buffer for the worst case
"999 pools ought to be enough for everyone" yet the actual maximum is UINT_MAX. Noticed while staring at #4138
1 parent 7292f92 commit d43e225

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/varnishd/cache/cache_session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ SES_Rel(struct sess *sp)
702702
void
703703
SES_NewPool(struct pool *pp, unsigned pool_no)
704704
{
705-
char nb[8];
705+
char nb[4 /* "sess" */ + 10 /* "%u" */ + 1];
706706

707707
CHECK_OBJ_NOTNULL(pp, POOL_MAGIC);
708708
bprintf(nb, "req%u", pool_no);

0 commit comments

Comments
 (0)