From 4b5197beb4b62baf93b4ae888557356d302f06e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20=22BKC=22=20Carlb=C3=A4cker?= Date: Tue, 12 Dec 2017 01:32:36 +0100 Subject: [PATCH] Fix Uninitialized variable in ParsePatch (#3156) --- models/git_diff.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/git_diff.go b/models/git_diff.go index 88285fa3e2..9e361d05f5 100644 --- a/models/git_diff.go +++ b/models/git_diff.go @@ -238,7 +238,7 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D var ( diff = &Diff{Files: make([]*DiffFile, 0)} - curFile *DiffFile + curFile = &DiffFile{} curSection = &DiffSection{ Lines: make([]*DiffLine, 0, 10), }