Correct issue with non-null-terminated buffer
@@ -455,7 +455,7 @@ NCD4_applyclientparamcontrols(NCD4INFO* info)
value = getparam(info,"substratename");
if(value != NULL)
- strncpy(info->controls.substratename,value,NC_MAX_NAME);
+ strncpy(info->controls.substratename,value,(NC_MAX_NAME-1));
info->controls.opaquesize = DFALTOPAQUESIZE;
value = getparam(info,"opaquesize");
@@ -520,4 +520,3 @@ getparam(NCD4INFO* info, const char* key)
return NULL;
return value;
}
-
