An ECDSA private key is simply a 256 bit integer between 0x1 and 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140.
There is a roughly 1 in 2^128 chance (not worth worrying about) of a random 256 bit key not falling in this range.
What would happen to a wallet program if this happened?