Commit 2adf1b8a authored by Claes Sjofors's avatar Claes Sjofors

co cdh_AttrValueToString() not threadsafe

parent 0aec4e2a
...@@ -550,7 +550,7 @@ cdh_AttrValueToString ( ...@@ -550,7 +550,7 @@ cdh_AttrValueToString (
if (ODD(time_DtoAscii(Value, 1, timbuf, sizeof(timbuf)))) { if (ODD(time_DtoAscii(Value, 1, timbuf, sizeof(timbuf)))) {
strncpy(String, timbuf, MaxSize); strncpy(String, timbuf, MaxSize);
} else { } else {
snprintf(String, MaxSize, "*** Bad delta time value ***"); strncpy(String, "*** Bad delta time value ***", MaxSize);
sts = CDH__INVDELTATIME; sts = CDH__INVDELTATIME;
} }
break; break;
...@@ -571,6 +571,7 @@ cdh_AttrValueToString ( ...@@ -571,6 +571,7 @@ cdh_AttrValueToString (
break; break;
} }
String[MaxSize-1] = 0;
return sts; return sts;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment