in rwobj.c rw_write_th does not seem to return the correct amount of bytes written. It just seems to return the amount attempted to write.
I don't think it cleans up properly on error. This probably hasn't been encountered since pygame doesn't really use rwobj writing except in the subversion pygame.