From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7607D3857C48; Sun, 21 Mar 2021 15:50:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7607D3857C48 From: "tiberiuzbirnea at gmail dot com" To: bzip2-devel@sourceware.org Subject: [Bug bzip2/27619] New: False error code returned by BZ2_bzBuffToBuffDecompress Date: Sun, 21 Mar 2021 15:50:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: bzip2 X-Bugzilla-Component: bzip2 X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tiberiuzbirnea at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: bzip2-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bzip2-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2021 15:50:28 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27619 Bug ID: 27619 Summary: False error code returned by BZ2_bzBuffToBuffDecompress Product: bzip2 Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: bzip2 Assignee: nobody at sourceware dot org Reporter: tiberiuzbirnea at gmail dot com CC: bzip2-devel at sourceware dot org Target Milestone: --- Version: 1.0.8 File: bzlib.c Function: BZ2_bzBuffToBuffDecompress Line: 1342 Actual conent: return BZ_OUTBUFF_FULL; Should be: return BZ_OK; Comment: In this function the "output_overflow_or_eof" label can be reached if "BZ2_bzDecompress" returned BZ_OK. The branch with line 1342 is reached if strm.avail_out =3D=3D 0, so th output buffer is full but nothing has to be = added anymore. Context: I have written a wrapper class for this version. At compression method I`ve allocated a buffer 4 bytes larger than it is presented in documentation "To guarantee that the compressed data will fit in its buffer, allocate an output buffer of size 1% larger than the uncompressed data, plus six hundred extra bytes" to store the uncompressed data size. At decompression I've constantly receive BZ_OUTBUFF_FULL as a result, despi= te strm.avail_out =3D=3D 0. --=20 You are receiving this mail because: You are on the CC list for the bug.=