I just ran into a nasty problem with an ISO download from Microsoft.  I successfully burnt it to a rewritable DVD, and copied the contents to the local hard drive on another machine, but when I went to run them they were corrupt.  It turns out the download had been truncated.

Now, OK, sometimes that happens - but it surprised me that the truncated file (which was only slightly more than 60% of the actual ISO) burnt successfully and seemed to be presenting me with a sensible file system, to the extent that I could (apparently) successfully copy the files.

So, is there some way I could have tested the file to see if it was complete or not?  The MS web site did not provide any information about the expected size, so I'm looking for a generic solution: given an ISO file which may or may not be truncated, is there some way to tell?  Do commonly used CD/DVD (data) formats include any embedded information about how much data is supposed to be on the disk, or even better, some kind of CRC?

A solution that detects most truncated images will be accepted, it doesn't need to be perfect.  (I'd prefer something that doesn't give false positives, though.)

[Addendum: a comparison of the disk burnt with the truncated image with the files extracted from the full image suggests that chunks of the data from many of the files were replaced with random information, perhaps from the contents of a previous burn to the same rewritable disk.]


Question: can a ring homomorphism map an integral domain to a non integral domain?
Answer: Consider the map
\begin{align*}
\phi : k&amp;\hookrightarrow k[X,Y]/(XY)\\
a&amp;\mapsto a + (XY),
\end{align*}
where $k$ is a field. This is the inclusion of $k$ into a quotient of the polynomial ring over $k$ in two variables. We see that this is a ring homomorphism, as $$\phi(ab) = (ab + (XY)) = (a + (XY))(b + (XY)) = \phi(a)\phi(b).$$ So we have an injection of a field (not just an integral domain, and not just a homomorphism) into a commutative ring with zero divisors: $$(X + (XY))(Y + (XY)) = XY + (XY) = 0 + (XY) = (XY).$$
Like xyzzyx said in his answer, you can also find a surjective map from an integral domain to a commutative ring with zero divisors (eg. $\pi : \Bbb{Z}\twoheadrightarrow\Bbb{Z}/n\Bbb{Z}$, where $n$ is composite), so we can indeed find injective or surjective maps from an integral domain to a ring with zero divisors.