This assignment is culprit, as far I know.
for (i = 0; i < octave; i++)
{
/* Big problem here: moving data from a two-dimensional array to a three-dimensional array */
leNoise[i] = smoothNoise[i];
}
Because C doesn't have anything called array-to-array copying. You should manually copy individual items from source to destination by carefully looping through arrays.
Ex, leNoise[x][y][z] = smoothNoise[i][j]