CADbloke / google-diff-match-patch

Automatically exported from code.google.com/p/google-diff-match-patch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uninitialised variable in C++ method diff_xIndex

GoogleCodeExporter opened this issue · comments

I ran my application through valgrind and it exposed a case where 
lastDiff.operation was used without being initialised within diff_xIndex. It 
may never be assigned to in the loop and so the test against DELETE is against 
an uninitialised value since the Diff default constructor does not set a value.

Either the default constructor should set a value or the code should be altered 
to mimic the Java version with lastDiff being a pointer to a Diff.


Original issue reported on code.google.com by fotherin...@gmail.com on 18 Feb 2012 at 9:47