]> The Tcpdump Group git mirrors - libpcap/blobdiff - gencode.c
Require "byte" argument value to be within range.
[libpcap] / gencode.c
index 40614b93dc34f6c886e546855ebba94a9977dda5..cc11f90ba6263bd139660003e6087ede12b49b44 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -8123,6 +8123,8 @@ gen_byteop(compiler_state_t *cstate, int op, int idx, bpf_u_int32 val)
        if (setjmp(cstate->top_ctx))
                return (NULL);
 
+       assert_maxval(cstate, "byte argument", val, UINT8_MAX);
+
        switch (op) {
        default:
                abort();