My program crashes with the following lines:
warning: HEAP[maze.exe]: warning: Heap block at 00392F30 modified at 00392F3B past requested size of 3
I am dynamically allocating space for a string
int userReq() {
char **maze=NULL;
char *pchar;
int i, test_cases, cur_test=0;
int row, col;
/* gather the amount of test cases */
scanf("%d", &test_cases);
do{
    scanf("%d",&row);
    scanf("%d",&col);
    /* allocate memory for char pointer row-wise */
    maze = (char **) malloc(row*sizeof(char*));
    for(i=0;i<row;i++)
        /* for each cell allocate the num of chars in cell */
        maze[i] = (char *) malloc(col*sizeof(char));
    for(i=0;i<row;i++) 
        scanf("%s",maze[i]);
            /* this function does modify the maze by changing some of the spots to a different char */
            CallSomeFunctionHere(maze);
    /* free first the cells then the entire block */
    for(i=0;i<row;i++)
        free(maze[i]);
    free(maze);
    cur_test = cur_test + 1;
}while(cur_test < test_cases);
/* if we were successful then exit program with
success */
return 0;
}
My program crashes after doing the logic then trying to free the memory.
 
     
     
    