From 40d3d5dc9adf530c7e72c3d5fd32cb6cc57f91cd9234d13a4f51e89cd5a3340a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Fri, 20 May 2011 11:31:31 +0000 Subject: [PATCH] - get rid of "unexpectedly shrank by one" error OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=114 --- debugedit-canon-fix.diff | 26 ++++++++++++++++++-------- rpm.changes | 5 +++++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff index 2434272..f2be21b 100644 --- a/debugedit-canon-fix.diff +++ b/debugedit-canon-fix.diff @@ -1,10 +1,5 @@ -Subject: Fix path canonicalization issues in debugedit - -This patch fixes multiple problems with path canonicalization in -debugedit. This version of debugedit is taken from the dwarftools repository. - ---- ./tools/debugedit.c.orig 2011-05-11 15:31:31.000000000 +0000 -+++ ./tools/debugedit.c 2011-05-11 15:54:49.000000000 +0000 +--- ./tools/debugedit.c.orig 2011-05-20 11:26:04.000000000 +0000 ++++ ./tools/debugedit.c 2011-05-20 11:27:56.000000000 +0000 @@ -158,7 +158,7 @@ strptr (DSO *dso, int sec, off_t offset) { if (data->d_buf @@ -76,7 +71,22 @@ debugedit. This version of debugedit is taken from the dwarftools repository. char *orig = strdup ((const char *) srcptr); -@@ -756,21 +761,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off +@@ -717,10 +722,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off + + if (shrank > 0) + { +- if (--shrank == 0) ++ --shrank; ++#if 0 ++ if (shrank == 0) + error (EXIT_FAILURE, 0, + "canonicalization unexpectedly shrank by one character"); + else ++#endif + { + memset (ptr, 'X', shrank); + ptr += shrank; +@@ -756,21 +764,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off } dirty_section (DEBUG_STR); } diff --git a/rpm.changes b/rpm.changes index b507303..955ed73 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri May 20 13:28:37 CEST 2011 - mls@suse.de + +- get rid of "unexpectedly shrank by one" error + ------------------------------------------------------------------- Thu May 19 14:51:13 CEST 2011 - mls@suse.de