--- /dev/null
+[SECURITY] CVE-2009-1391: Fix a buffer overflow in inflate().
+
+Closes: #532738
+
+https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2009-1391
+
+Fix cherry-picked from upstream version 2.017.
+--- libcompress-raw-zlib-perl-2.012.orig/Zlib.xs
++++ libcompress-raw-zlib-perl-2.012/Zlib.xs
+@@ -1319,7 +1319,7 @@
+ while (RETVAL == Z_OK) {
+ 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 ;