From 2f0e9172a4e26aed422cbcc5899f51aab1087a3e Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 17 Feb 2015 10:45:30 -0500 Subject: [PATCH] tool_lib.c: ensure output string is always set Ensure that val2str always writes to its output buffer, which is static and shared between all PVs. Should make bugs like lp:1418526 more obvious. --- src/catools/tool_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/catools/tool_lib.c b/src/catools/tool_lib.c index 080b6c3de..22ea66c7e 100644 --- a/src/catools/tool_lib.c +++ b/src/catools/tool_lib.c @@ -120,6 +120,7 @@ char *val2str (const void *v, unsigned type, int index) strcpy (str, "*** invalid type"); return str; } + strcpy (str, "!!!"); base_type = type % (LAST_TYPE+1);