Index: django/core/validators.py
===================================================================
--- django/core/validators.py	(revision 4836)
+++ django/core/validators.py	(working copy)
@@ -168,14 +168,26 @@
     """
     from PIL import Image
     from cStringIO import StringIO
+    no_file_msg = gettext("No file was submitted. Check the encoding type on the form.")
+    invalid_file_msg = gettext("Upload a valid image. The file you uploaded was either not an image or a corrupted image.")
     try:
         content = field_data['content']
     except TypeError:
-        raise ValidationError, gettext("No file was submitted. Check the encoding type on the form.")
+        raise ValidationError, no_file_msg
     try:
-        Image.open(StringIO(content))
-    except IOError: # Python Imaging Library doesn't recognize it as an image
-        raise ValidationError, gettext("Upload a valid image. The file you uploaded was either not an image or a corrupted image.")
+        # load() is the only method that can spot a truncated JPEG,
+        #  but it cannot be called sanely after verify()
+        trial_image = Image.open(StringIO(content))
+        trial_image.load()
+        # verify() is the only method that can spot a corrupt PNG,
+        #  but it must be called immediately after the constructor
+        trial_image = Image.open(StringIO(content))
+        trial_image.verify()
+    except Exception, error:  # Too many exception types from PIL to enumerate properly
+        message = invalid_file_msg
+        if settings.DEBUG:
+            message = message + "\n" + str(error)
+        raise ValidationError(message)
 
 def isValidImageURL(field_data, all_data):
     uc = URLMimeTypeCheck(('image/jpeg', 'image/gif', 'image/png'))
