mozilla/pdf.js — pull request #5600 by timvandermeij (2014-12-30 13:20:53+00:00)
Title: Do not call str.length if str is undefined

Fixes #5599.

The problem is that `stringToBytes` in `src/shared/util.js` can be called with an `undefined` string for some PDFs. This PR makes sure we handle that case correctly by setting the length to 0. Note that this function has to return a `Uint8Array`, even if it's of length 0, because other functionality in PDF.js depends on that.