targa: prevent integer overflow in bufsize check.