curran / curran/google-diff-match-patch

Uninitialised variable in C++ method diff_xIndex

Open
#66 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
Python
Stars
17
Forks
2
PR merge metrics
No merged PRs in 30d

Description

```
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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.