Skip to content

decompress_R2004_section have a bug #1186

@Dylan-H

Description

@Dylan-H
#ifdef NDEBUG
      memmove (&dec->chain[pos], &dec->chain[pos - comp_offset], comp_bytes);
#else
      for (; pos < end; pos++)
        {
          unsigned char b;
          assert ((long)pos >= (long)comp_offset);
          assert (pos - comp_offset < dec->size);
          b = dec->chain[pos - comp_offset];
          assert (pos < dec->size);
          dec->chain[pos] = b;
        }
#endif

In Release mode, the behavior of memmove is not equivalent to the following code.
The result in Debug mode at the same location is as shown below

Image In the same position Release mode the result is as follows Image

Metadata

Metadata

Assignees

Labels

blockingbugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions