C语言编辑矩阵运算，数据溢出问题

if (td == 0){
float c1 = 2;
float c2 = 2;
float MaxDT = 20;
uint16_t N = 40;//Initialize the individuals in the tribe
uint16_t Nu = 10;
int D = Nu * 2;//Search Space dimension
int stop_index = 0;

``````    /*v*/
rand_1 = rand(rand_1);
rand_result = rand_1 / data2;
float v_rand1 = -5 + 10 * rand_result;
//int column1 = Nu * 2;
Matrix_t mat_v1 = ones(N, Nu * 2);
........

Matrix_t ones(uint16_t m, uint16_t n){
if (m <= 0 || n <= 0){
exit(1);
}
Matrix_t mat = create_mat(m, n);
uint16_t i, j;
for (i = 0; i < n; i++){
for (j = 0; j < m; j++){
mat.data[i][j] = 1;
}
}
return mat;
}

Matrix_t create_mat(uint16_t row, uint16_t column){
Matrix_t mat;
if (row <= 0||column<=0)
{
//printf("error, in create_mat: row <= 0||column<=0\n");
exit(1);
}
if (row > 0 && column > 0)
{
mat.row = row;
mat.column = column;
mat.data = (float **)malloc(row*sizeof(float *));//先指针的指针
if (mat.data == NULL)
{
//printf("error, in create_mat: mat.data==NULL");
exit(1);
}
uint16_t i;
for (i = 0; i < row; i++)
{
*(mat.data + i) = (float *)malloc(column*sizeof(float));//再分配每行的指针
if (mat.data[i] == NULL)
{
//printf("error, in create_mat: mat.data==NULL");
exit(1);
}
}
clear_mat(&mat);
}
return mat;
``````

}