Menu

#2658 Writing 1 byte into a region of size 0 in Bcj2Enc.c

None
open-rejected
nobody
None
5
2 days ago
3 days ago
No

Not sure this is the right place for reporting it, but this is about the LZMA SDK 26.01. I first noticed the issue years ago (with older SDKs) but I had not found time to report it before. I'm currently reproducing it with GCC 13 on Linux. This warning is reported:

Bcj2Enc.c: In function Bcj2Enc_Encode’:
Bcj2Enc.c:488:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  488 |         p->temp[i] = src[i];
      |         ~~~~~~~~~~~^~~~~~~~
Bcj2Enc.c:14:
Bcj2.h:287:8: note: at offset 8 into destination object temp of size 8
  287 |   Byte temp[8];
      |        ^~~~

I don't know if that's a false positive or not. I noticed it when upgrading LZMA from https://github.com/DaemonEngine/crunch.

Discussion

  • Igor Pavlov

    Igor Pavlov - 2 days ago
    • status: open --> open-rejected
    • Group: -->
     
  • Igor Pavlov

    Igor Pavlov - 2 days ago

    false positive

     
    👍
    1

Log in to post a comment.

MongoDB Logo MongoDB