]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
src: make CGRP_RULE_MAXLINE include CG_OPTIONS_MAX
authorMikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
Wed, 13 Aug 2025 07:01:11 +0000 (12:31 +0530)
committerKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 13 Aug 2025 11:58:18 +0000 (17:28 +0530)
commit88fc455b8d0df20910ee2f8e90eb90a4752bd986
tree67d062dee9b5f8e0df6460ee00c2b6c1c6cf3799
parentb922d6cf8ff8febe1f093de0070b27f0435aabb6
src: make CGRP_RULE_MAXLINE include CG_OPTIONS_MAX

CGRP_RULE_MAXLINE const, which is used as a length for buffer for
unparsed cgroup rules strings, doesn't include length of options
field (CG_OPTIONS_MAX). Therefore buffer length is not enough
to store all rule fields.

Commit is aimed to include CG_OPTIONS_MAX in CGRP_RULE_MAXLINE
to avoid potential problems with rules parsing.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

[Kamalesh introduced tabs to align with macro continuation]
Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
src/libcgroup-internal.h