return GST_AUTOPLUG_SELECT_TRY;
}
memset(handle->property->audiodecodename, 0, ENC_BUFFER_SIZE);
- strncpy(handle->property->audiodecodename, feature_name, strlen(feature_name));
+ strncpy(handle->property->audiodecodename, feature_name, ENC_BUFFER_SIZE - 1);
+ handle->property->audiodecodename[ENC_BUFFER_SIZE] = '\0';
debug_log("[audio decode name %s : %s]", caps_str, handle->property->audiodecodename);
}
return GST_AUTOPLUG_SELECT_TRY;
}
memset(handle->property->videodecodename, 0, ENC_BUFFER_SIZE);
- strncpy(handle->property->videodecodename, feature_name, strlen(feature_name));
+ strncpy(handle->property->videodecodename, feature_name, ENC_BUFFER_SIZE - 1);
+ handle->property->videodecodename[ENC_BUFFER_SIZE] = '\0';
debug_log("[video decode name %s : %s]", caps_str, handle->property->videodecodename);
}
}
memset(handle->param->outputfile, 0, BUFFER_SIZE);
- strncpy(handle->param->outputfile, param->outputfile, strlen(param->outputfile));
+ strncpy(handle->param->outputfile, param->outputfile, BUFFER_SIZE - 1);
+ handle->param->outputfile[BUFFER_SIZE] = '\0';
handle->param->seeking = param->seeking;
handle->param->async_done = FALSE;
return MM_ERROR_TRANSCODE_NO_FREE_SPACE;
}
memset(param->outputfile, 0, BUFFER_SIZE);
- strncpy(param->outputfile, out_Filename, strlen(out_Filename));
+ strncpy(param->outputfile, out_Filename, BUFFER_SIZE - 1);
+ param->outputfile[BUFFER_SIZE] = '\0';
debug_log("%s(%d)", param->outputfile, strlen(out_Filename));
} else {
debug_error("out_Filename error");