Skip to content

Infinite loop in diff_cleanup_merge() #5

@errzey

Description

@errzey

While I am still actively debugging this, it would be nice to get a second set of eyes on this:

Take file a

a
bcde

Then file b

A
bcdefghijklmnopqrs

The process works as expected:

> "a\x0abcde\x0a"
-"a", +"A", ="\x0abcde", +"fghijklmno", ="\x0a"
< "A\x0abcdefghijklmnopqrs\x0a"

But if you add one more character to the second line of file b (note the trailing t)

A
bcdefghijklmnopqrst

The third iteration of diff_cleanup_merge() will never hit i != -1

As I've stated, I'm actively debugging this, but just thought you might want to know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions