You have been subscribed to a public bug:

Description:   zlib: compressBound() returns an incorrect result on z15
Symptom:       Passing the result of compressBound() to compress()
               results in an error code.
Problem:       compressBound() is not adjusted for DFLTCC.
Solution:      Adjust compressBound() for DFLTCC like it's already done
               for deflateBound(). Since zlib project does not accept
               patches at the moment, the fix has been integrated into
               the DFLTCC pull request:
               https://github.com/madler/zlib/pull/410
               The commitid is b25781e735363e04f6c56e21431c47e4afc50b17.

Reproduction:  z15 only:
               #include <assert.h>
               #include <stdlib.h>
               #include <zlib.h>
               int main() {
                   Bytef in_buf[128], out_buf[1024];
                   for (size_t i = 0; i < sizeof(in_buf); i++)
                       in_buf[i] = rand();
                   uLongf dest_len = compressBound(sizeof(in_buf));
                   assert(dest_len <= sizeof(out_buf));
                   int ret = compress(out_buf, &dest_len,
                                      in_buf, sizeof(in_buf));
                   assert(ret == Z_OK);
               }

** Affects: zlib (Ubuntu)
     Importance: Undecided
     Assignee: Skipper Bug Screeners (skipper-screen-team)
         Status: New


** Tags: architecture-s39064 bugnameltc-194923 severity-high 
targetmilestone-inin2110
-- 
[Ubuntu 21.10] zlib: compressBound() returns an incorrect result on z15
https://bugs.launchpad.net/bugs/1961427
You received this bug notification because you are a member of Ubuntu Touch 
seeded packages, which is subscribed to zlib in Ubuntu.

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to