Merge "Klockwork P1 issues."

This commit is contained in:
Linux Build Service Account 2015-02-27 07:04:19 -08:00 committed by Gerrit - the friendly Code Review server
commit bcf47cc016

View file

@ -329,9 +329,14 @@ int loc_update_conf(const char* conf_data, int32_t length,
if (conf_data && length && config_table && table_length) {
// make a copy, so we do not tokenize the original data
char* conf_copy = (char*)malloc(length+1);
memcpy(conf_copy, conf_data, length);
// we hard NULL the end of string to be safe
conf_copy[length] = 0;
if(conf_copy !=NULL)
{
memcpy(conf_copy, conf_data, length);
// we hard NULL the end of string to be safe
conf_copy[length] = 0;
}
// start with one record off
uint32_t num_params = table_length - 1;
char* saveptr = NULL;