mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 12:44:34 +03:00
Security review: check results of snprintf.
Calls marked with xSnprintf shouldn't fail. Abort program cleanly if any of them does.
This commit is contained in:
@ -81,7 +81,7 @@ AvailableColumnsPanel* AvailableColumnsPanel_new(Panel* columns) {
|
||||
for (int i = 1; i < Platform_numberOfFields; i++) {
|
||||
if (i != COMM && Process_fields[i].description) {
|
||||
char description[256];
|
||||
snprintf(description, sizeof(description), "%s - %s", Process_fields[i].name, Process_fields[i].description);
|
||||
xSnprintf(description, sizeof(description), "%s - %s", Process_fields[i].name, Process_fields[i].description);
|
||||
Panel_add(super, (Object*) ListItem_new(description, i));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user