edoarsla / google-diff-match-patch

Automatically exported from code.google.com/p/google-diff-match-patch
Apache License 2.0
0 stars 0 forks source link

Crash observed when very long paragraphs are diffed (Objective-C) #81

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create two similar string with a paragraph of over 10,000 characters (no \n 
characters for a long time)
2. Diff the two strings.  

I get a crash in DiffMatchPatch on line 674, an array is not being allocated, 
crashing in the for loop.

What version of the product are you using? On what operating system?
I am using OS X 10.8 Mountain Lion with XCode 4.5.2

Please provide any additional information below.

I was able to 'fix' the issue by changing the allocation of these arrays to 
malloc, the .m file is attached.  However, there might be more issues caused by 
this issue with very long lines.

If you have any trouble repeating the issue, I'd be happy to help.

Original issue reported on code.google.com by stephen....@gmail.com on 30 Jan 2013 at 4:59

Attachments: