SRD:Inflict Critical Wounds

When laying your hand upon a creature, you channel negative energy that deals 4d8 points of damage +1 point per caster level (maximum +20).

Since undead are powered by negative energy, this spell cures such a creature of a like amount of damage, rather than harming it.