Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized string offset in MsDoc.php #853

Open
jaberu opened this issue Aug 6, 2016 · 4 comments
Open

Uninitialized string offset in MsDoc.php #853

jaberu opened this issue Aug 6, 2016 · 4 comments

Comments

@jaberu
Copy link

jaberu commented Aug 6, 2016

When trying to parse a larger doc file I get the following stacktrace:

Uninitialized string offset: 2228225
C:\workspace\PhpOfficeUtils\vendor\phpoffice\phpword\src\PhpWord\Reader\MsDoc.php:2305
C:\workspace\PhpOfficeUtils\vendor\phpoffice\phpword\src\PhpWord\Reader\MsDoc.php:1147
C:\workspace\PhpOfficeUtils\vendor\phpoffice\phpword\src\PhpWord\Reader\MsDoc.php:1099
C:\workspace\PhpOfficeUtils\vendor\phpoffice\phpword\src\PhpWord\Reader\MsDoc.php:118
C:\workspace\PhpOfficeUtils\vendor\phpoffice\phpword\src\PhpWord\IOFactory.php:78

I tried to understand what's going on. As it seems the calculated aSed (MsDoc.php:1137) is not correct. The length of the given data string is only 1818112, why reading at index 2228225 causes this error.

Unfortunatelly my document includes sensible data why I cannot share it. If you need any further information please let me know.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@mabadir
Copy link

mabadir commented Oct 29, 2016

I am having a similar issue, and I am not sure what's wrong. The file is created by Word for Mac.

@tobiasvielmetter
Copy link

I am having the same issue with any *.doc file generated on a mac.

@netoramalho
Copy link

The same issue here, any solution?

@hirenpatel1903
Copy link

I am having the same issue with any *.doc file generated
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants