File perl-zlib-growoob.diff of Package perl

--- ./ext/Compress/Raw/Zlib/Zlib.xs.orig	2007-12-18 10:47:07.000000000 +0000
+++ ./ext/Compress/Raw/Zlib/Zlib.xs	2009-06-10 09:11:57.000000000 +0000
@@ -1295,7 +1295,7 @@ inflate (s, buf, output, eof=FALSE)
 
         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 = (Bytef*) SvPVbyte_nolen(output) + cur_length ;
             increment = bufinc ;
@@ -1336,7 +1336,7 @@ inflate (s, buf, output, eof=FALSE)
         s->stream.avail_in = 1;
         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 = (Bytef*) SvPVbyte_nolen(output) + cur_length ;
             increment = bufinc ;
openSUSE Build Service is sponsored by