Well my guess is that your parent(s) are not having 100% height.
Eg html, body { height: 100%; } and perhaps other children that may be parents of the "overlay" (if any).
I am not sure tho, nor that I had any experience with negative value, just a guess.
Other than that, I don't see why it would return negative value.
Here's example of html and body being parents of that .overlay.
Example 1
And here's example of html, body and .another-parent being parents of that .overlay.
Example 2
Keep in mind that I used position: relative on .overlay in both examples as assumption. Although overlays are mostlikely suppoused to be absolute or fixed - hence they won't depend on parent(s) height.