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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user