[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1034788: marked as done (unblock: git-crecord/20220324.0-2)



Your message dated Mon, 8 May 2023 19:51:12 +0200
with message-id <0d9ed954-2d26-66bb-0bfd-3396faeee8d1@debian.org>
and subject line Re: Bug#1034788: unblock: git-crecord/20220324.0-2
has caused the Debian Bug report #1034788,
regarding unblock: git-crecord/20220324.0-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1034788: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034788
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: git-crecord@packages.debian.org
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 <andrewsh@debian.org>  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 <andrew@shadura.me>
+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 <andrew@shadura.me>
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


--- End Message ---
--- Begin Message ---
Hi,

On 03-05-2023 20:30, Paul Gevers wrote:
The moreinfo tag was still attached, so we missed the upload for a while. Anyways, unblocked, thanks.

And I forgot to close the bug with that message.

Paul

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


--- End Message ---

Reply to: