26 lines
799 B
Diff
26 lines
799 B
Diff
From 9d6e8bfe26c24df8272d6af782ebbde9ef62acb0 Mon Sep 17 00:00:00 2001
|
|
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
Date: Wed, 6 Sep 2017 17:35:56 +0200
|
|
Subject: [PATCH] Avoid letting snprintf interpret process name as format
|
|
|
|
---
|
|
utils/lstopo/lstopo.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/utils/lstopo/lstopo.c b/utils/lstopo/lstopo.c
|
|
index a23980010d..e9d600d457 100644
|
|
--- a/utils/lstopo/lstopo.c
|
|
+++ b/utils/lstopo/lstopo.c
|
|
@@ -229,7 +229,7 @@ static void add_process_objects(hwloc_topology_t topology)
|
|
if (!parenl) {
|
|
snprintf(comm, sizeof(comm), "(unknown)");
|
|
} else {
|
|
- snprintf(comm, sizeof(comm), parenl+1);
|
|
+ snprintf(comm, sizeof(comm), "%s", parenl+1);
|
|
}
|
|
}
|
|
|
|
--
|
|
2.13.6
|
|
|