>From 123e2c53430273c8f2dc6337ff187ee6218fddbe Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Mon, 15 Jun 2009 00:53:46 +0300 Subject: [PATCH] Fix a buffer overflow in bzinflate() --- Bzip2.xs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Bzip2.xs b/Bzip2.xs index d936495..b85f8b8 100644 --- a/Bzip2.xs +++ b/Bzip2.xs @@ -753,7 +753,7 @@ bzinflate (s, buf, output) if (s->stream.avail_out == 0) { /* out of space in the output buffer so make it bigger */ - Sv_Grow(output, SvLEN(output) + bufinc) ; + Sv_Grow(output, SvLEN(output) + bufinc +1) ; cur_length += increment ; s->stream.next_out = (char*) SvPVbyte_nolen(output) + cur_length ; increment = bufinc ; -- 1.5.6.5