--- zzzz-none-000/linux-4.1.52/fs/jffs2/compr_rtime.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/fs/jffs2/compr_rtime.c 2022-03-02 11:37:13.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;