Skip to content
Commit f3e8977c authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

proc: add a static buffer to prevent segv (v3)



A few of our functions use buffer and string functions.
All these functions require that a string contains '\0' at the end.
Before this patch we didn't guarantee that.

I've seen segmentation fault in parse_pid_stat_small.

v2: simplify code
v3: remove assignment, because it's redundant and a size of object file
become bigger.

Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent 4f31e13c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment