The PDF engine was returning -1 from engine_->GetCharCount(), and we were trying to allocate that many bytes. See bug for repro. BUG=648981 Review-Url: https://codereview.chromium.org/2648013002 Cr-Commit-Position: refs/heads/master@{#447132}