Package: release.debian.org Severity: normal User: [email protected] Usertags: unblock X-Debbugs-Cc: [email protected] Control: affects -1 + src:git-crecord
Please unblock package git-crecord I am going to upload a one-line patch to the package git-crecord. In the patch parser code, there is a typo in one of the parser branches: a variable "fromline" is mistakenly spelled as "fromtoline". This causes crashes in certain situations when one of the files has no EOL at the end of the last line. Currently, this part of code is not, unfortunately, covered by tests which would have helped detect it. Risks associated with this change are very low, since it is a trivial fix for functionality that was broken in the last upload. [ Checklist ] [x] all changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in testing unblock git-crecord/20220324.0-2
diff --git a/debian/changelog b/debian/changelog index 76780fabf273..7f32f95f6c4f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +git-crecord (20230226.0-2) unstable; urgency=medium + + * Apply an upstream patch to fix a crash in the patch parsing code. + + -- Andrej Shadura <[email protected]> Mon, 24 Apr 2023 15:19:32 +0200 + git-crecord (20230226.0-1) unstable; urgency=medium * New upstream release. diff --git a/debian/patches/0001-Fix-a-typo-in-a-variable-name.patch b/debian/patches/0001-Fix-a-typo-in-a-variable-name.patch new file mode 100644 index 000000000000..d0f69f195556 --- /dev/null +++ b/debian/patches/0001-Fix-a-typo-in-a-variable-name.patch @@ -0,0 +1,21 @@ +From: Andrej Shadura <[email protected]> +Date: Mon, 24 Apr 2023 15:08:05 +0200 +Subject: Fix a typo in a variable name + +--- + git_crecord/crpatch.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/git_crecord/crpatch.py b/git_crecord/crpatch.py +index c0dbea1..1055e0e 100644 +--- a/git_crecord/crpatch.py ++++ b/git_crecord/crpatch.py +@@ -622,7 +622,7 @@ class Hunk(PatchNode): + line.offset = toline + if line.diffop == HunkLine.NOEOL: + if not deletes: +- line.offset = fromtoline ++ line.offset = fromline + else: + line.offset = toline + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000000..25ce53310314 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-Fix-a-typo-in-a-variable-name.patch
>From 8020a3fd1b52ffba521a1461960f560d86982e45 Mon Sep 17 00:00:00 2001 From: Andrej Shadura <[email protected]> Date: Mon, 24 Apr 2023 15:08:05 +0200 Subject: [PATCH] Fix a typo in a variable name --- git_crecord/crpatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_crecord/crpatch.py b/git_crecord/crpatch.py index c0dbea144289..1055e0e1cec8 100644 --- a/git_crecord/crpatch.py +++ b/git_crecord/crpatch.py @@ -622,7 +622,7 @@ class Hunk(PatchNode): line.offset = toline if line.diffop == HunkLine.NOEOL: if not deletes: - line.offset = fromtoline + line.offset = fromline else: line.offset = toline -- 2.39.2

