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

plumbing: object/patch, printStat strings.Repeat cause panic #310

Merged
merged 1 commit into from May 12, 2021

Conversation

cookeem
Copy link
Contributor

@cookeem cookeem commented May 7, 2021

int(math.Floor(deln / scaleFactor)) return negative value cause strings.Repeat panic

strings.Repeat(0x2322604, 0x1, 0xfffffffffffffff1, 0x0, 0x0)
 /usr/local/go/src/strings/strings.go:529 +0x5e5
github.com/go-git/go-git/v5/plumbing/object.printStat(0xc0003d0000, 0x1, 0x1, 0xc0003d0000, 0x1)
 /go/pkg/mod/github.com/go-git/go-git/v5@v5.3.0/plumbing/object/patch.go:291 +0x225
github.com/go-git/go-git/v5/plumbing/object.FileStats.String(...)
 /go/pkg/mod/github.com/go-git/go-git/v5@v5.3.0/plumbing/object/patch.go:238
dory.gitGetDiff(0xc00100b0b0, 0xc000c58780, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0)
 /root/devops-dory-engine/Codes/Backend/dory-engine/dory/git.go:134 +0x7bd

@mcuadros mcuadros changed the title printStat strings.Repeat cause panic plumbing: object/patch, printStat strings.Repeat cause panic May 11, 2021
@mcuadros mcuadros merged commit e6e2339 into go-git:master May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants