]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
samples/read_stats: terminate cgrp_path buffers
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Sat, 31 Jan 2026 06:49:40 +0000 (12:19 +0530)
committerKamalesh Babulal <kamalesh.babulal@oracle.com>
Tue, 10 Mar 2026 16:38:04 +0000 (22:08 +0530)
commit7ec258252198825e5bd1fce02f79ec0e4e1556ca
tree5c5828bf20dbc720eaeecccbdfdd0c7cf9c8c8db
parentd436b6aad57cd9bf31d176a92906bf1b0698b7df
samples/read_stats: terminate cgrp_path buffers

This adds an explicit '\0' after each strncpy() in the sample so the
subsequent strcat calls stay within bounds.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
samples/c/read_stats.c