Skip to content

Commit

Permalink
fix(modern_bpf): consider arg len = MAX_PROC_ARG_ENV edge case
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo authored and poiana committed Feb 1, 2024
1 parent 41385b0 commit fa62e25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion driver/modern_bpf/helpers/store/auxmap_store_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static __always_inline void auxmap__store_execve_args(struct auxiliary_map *auxm
total_len += arg_len;
}
/* the sum of all env variables lengths should be `<= MAX_PROC_ARG_ENV` */
if(total_len > MAX_PROC_ARG_ENV)
if(total_len >= MAX_PROC_ARG_ENV)
{
total_len = MAX_PROC_ARG_ENV;
}
Expand Down

0 comments on commit fa62e25

Please sign in to comment.