check for malloc failure znd zero memory (from jim%wind@bellcore.com)