]> granicus.if.org Git - strace/commit
bpf: harmonize length checks
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 12 Apr 2018 23:00:29 +0000 (23:00 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 12 Apr 2018 23:00:29 +0000 (23:00 +0000)
commitee2c065dd4c98d0888fe1ccbbec348357f1c302b
treebd87a0b23f3821cc03d5a3a78cf5985fd5f75a68
parent25a5961610e597c5e9fc5ccdd31a0e24bd2ff11b
bpf: harmonize length checks

The rest of the decoder uses offsetof to check the length.

* bpf.c (BEGIN_BPF_CMD_DECODER(BPF_OBJ_PIN),
BEGIN_BPF_CMD_DECODER(BPF_PROG_GET_NEXT_ID),
BEGIN_BPF_CMD_DECODER(BPF_PROG_GET_FD_BY_ID),
BEGIN_BPF_CMD_DECODER(BPF_MAP_GET_FD_BY_ID)): Use offsetof instead
of offsetofend.
bpf.c