{">", '>'},
{""", '\"'},
{"'", '\''},
- {OP_NULL, ' '}};
+ {OP_NULL, ' '} };
int op_com_util_remove_blankspace(char *Source, int srcLen)
{
}
int op_com_util_resolve_version(char *source, int *major, int *minor,
- int *micro)
+ int *micro)
{
int ret = OP_RESULT_OK;
int ma = 0;
char *op_com_utils_concat(char *source, char *substring)
{
char *ret_str = NULL;
+ size_t ret_str_len = strlen(source) + strlen(substring) + 1;
- ret_str = (char*)calloc(1, strlen(source) + strlen(substring) + 1);
+ ret_str = (char*)calloc(1, ret_str_len);
if (OP_NULL != ret_str) {
- strncpy(ret_str, source, strlen(source));
- strncat(ret_str, substring, strlen(substring));
+ strncpy(ret_str, source, strlen(source) + 1);
+ strncat(ret_str, substring, ret_str_len - strlen(ret_str) - 1);
}
return ret_str;
app_data_local = (op_parser_app_data_t *)calloc(1,
sizeof(op_parser_app_data_t));
- if (OP_NULL == app_data) {
+ if (OP_NULL == app_data_local) {
OP_LOGE("MEMORY ALLOCATION FAIL");
ret = OP_ERR_FAIL_TO_MEMALLOC;
goto ERR;
strncat(dd_info->name, ch_str, OP_MAX_URI_LEN
- strlen(dd_info->name) - 1);
} else if (strlen(ch_str) < OP_MAX_STR_LEN) {
- strncpy(dd_info->name, ch_str, strlen(ch_str));
+ strncpy(dd_info->name, ch_str, strlen(ch_str) + 1);
}
OP_SLOG("dd_info->name:[%s]", dd_info->name);
app_data->parseError = OP_ERR_FAIL_TO_MEMALLOC;
goto ERR;
}
- strncpy(dd_info->vendor, ch_str, strlen(ch_str));
+ strncpy(dd_info->vendor, ch_str, strlen(ch_str) + 1);
}
OP_SLOG("dd_info->vendor:[%s]", dd_info->vendor);
goto ERR;
}
strncpy(dd_info->install_notify_uri,
- (const char*)ch_str, strlen(ch_str));
+ (const char*)ch_str, strlen(ch_str) + 1);
}
OP_SLOG("dd_info->install_notify_uri:[%s]",
dd_info->install_notify_uri);
goto ERR;
}
strncpy(dd_info->description,
- (const char*)ch_str, strlen(ch_str));
+ (const char*)ch_str, strlen(ch_str) + 1);
}
OP_SLOG("dd_info->description:[%s]",
dd_info->description);
goto ERR;
}
strncpy(dd_info->midlet_info_url,
- (const char*)ch_str, strlen(ch_str));
+ (const char*)ch_str, strlen(ch_str) + 1);
}
OP_SLOG("dd_info->midlet_info_url:[%s]",
dd_info->midlet_info_url);
goto ERR;
}
strncpy(dd_info->icon_uri, (const char*)ch_str,
- strlen(ch_str));
+ strlen(ch_str) + 1);
OP_SLOG("dd_info->icon_uri:[%s]",
dd_info->icon_uri);
}
goto ERR;
}
strncpy(dd_info->next_url, (const char*)ch_str,
- strlen(ch_str));
+ strlen(ch_str) + 1);
}
OP_SLOG("dd_info->next_url:[%s]",