One test case fails
One test case failing
if (maze[i][j] == 'X')
{
return false;
}
This condition is placed at the top of your function. It might be possible that i and j are out of bounds in some call. This needs to be fixed.
Your code could also give segmentation fault for these checks as well -
if (soln[i + 1][j] == 0)
First check if these values are in bounds or not.