--- zzzz-none-000/linux-4.19.183/fs/jffs2/compr_rtime.c 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/fs/jffs2/compr_rtime.c 2023-06-28 08:54:20.000000000 +0000 @@ -39,6 +39,11 @@ memset(positions,0,sizeof(positions)); +#if defined (CONFIG_BCM_KF_JFFS) + if (*dstlen < 2) + return -1; + +#endif while (pos < (*sourcelen) && outpos <= (*dstlen)-2) { int backpos, runlen=0; unsigned char value;