Accepting request 460704 from home:rguenther:branches:Base:System
- Fix debugedit-canon-fix.diff to handle directory table size shrinking by 1 byte correctly. OBS-URL: https://build.opensuse.org/request/show/460704 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=381
This commit is contained in:
parent
b0a565dbe4
commit
7a839c1a47
@ -1,5 +1,7 @@
|
|||||||
--- ./tools/debugedit.c.orig 2017-01-19 12:59:37.848194305 +0000
|
Index: tools/debugedit.c
|
||||||
+++ ./tools/debugedit.c 2017-01-19 12:59:45.236173176 +0000
|
===================================================================
|
||||||
|
--- tools/debugedit.c.orig 2017-02-27 13:35:18.727800856 +0100
|
||||||
|
+++ tools/debugedit.c 2017-02-27 14:22:33.975985617 +0100
|
||||||
@@ -162,7 +162,7 @@ strptr (DSO *dso, int sec, off_t offset)
|
@@ -162,7 +162,7 @@ strptr (DSO *dso, int sec, off_t offset)
|
||||||
{
|
{
|
||||||
if (data->d_buf
|
if (data->d_buf
|
||||||
@ -71,22 +73,29 @@
|
|||||||
|
|
||||||
char *orig = strdup ((const char *) srcptr);
|
char *orig = strdup ((const char *) srcptr);
|
||||||
|
|
||||||
@@ -730,10 +735,13 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
@@ -730,11 +735,18 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||||
|
|
||||||
if (shrank > 0)
|
if (shrank > 0)
|
||||||
{
|
{
|
||||||
- if (--shrank == 0)
|
- if (--shrank == 0)
|
||||||
+ --shrank;
|
- error (EXIT_FAILURE, 0,
|
||||||
+#if 0
|
- "canonicalization unexpectedly shrank by one character");
|
||||||
+ if (shrank == 0)
|
+ if (shrank == 1)
|
||||||
error (EXIT_FAILURE, 0,
|
+ {
|
||||||
"canonicalization unexpectedly shrank by one character");
|
+ /* For size 1 we can't append a dummy entry as a '\0' tells
|
||||||
|
+ it the directory table ends prematurely and thus the file
|
||||||
|
+ table will end up empty. Simply append a / to the last
|
||||||
|
+ directory entry in this case. */
|
||||||
|
+ *(ptr - 1) = '/';
|
||||||
|
+ *ptr++ = '\0';
|
||||||
|
+ }
|
||||||
else
|
else
|
||||||
+#endif
|
|
||||||
{
|
{
|
||||||
|
+ --shrank;
|
||||||
memset (ptr, 'X', shrank);
|
memset (ptr, 'X', shrank);
|
||||||
ptr += shrank;
|
ptr += shrank;
|
||||||
@@ -769,21 +777,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
*ptr++ = '\0';
|
||||||
|
@@ -769,21 +781,26 @@ edit_dwarf2_line (DSO *dso, uint32_t off
|
||||||
}
|
}
|
||||||
dirty_section (DEBUG_STR);
|
dirty_section (DEBUG_STR);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 27 13:24:26 UTC 2017 - rguenther@suse.com
|
||||||
|
|
||||||
|
- Fix debugedit-canon-fix.diff to handle directory table size shrinking
|
||||||
|
by 1 byte correctly.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 20 14:17:26 CET 2017 - mls@suse.de
|
Mon Feb 20 14:17:26 CET 2017 - mls@suse.de
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user