]> git.ipfire.org Git - thirdparty/kernel/linux.git/blobdiff - arch/mips/net/bpf_jit.c
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[thirdparty/kernel/linux.git] / arch / mips / net / bpf_jit.c
index d1b7bd09253a9698abebd54711cbd62071fb1de0..39e7b472f0d8b103197d904550a3db150c861051 100644 (file)
@@ -1199,7 +1199,7 @@ void bpf_jit_compile(struct bpf_prog *fp)
 
        memset(&ctx, 0, sizeof(ctx));
 
-       ctx.offsets = kcalloc(fp->len, sizeof(*ctx.offsets), GFP_KERNEL);
+       ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL);
        if (ctx.offsets == NULL)
                return;