mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
libtar: fix patch's whitespace
This commit is contained in:
parent
9f08b81dac
commit
6757365e01
1 changed files with 36 additions and 36 deletions
|
@ -44,52 +44,52 @@ Forwarded: yes
|
||||||
char *
|
char *
|
||||||
th_get_pathname(TAR *t)
|
th_get_pathname(TAR *t)
|
||||||
{
|
{
|
||||||
if (t->th_buf.gnu_longname)
|
if (t->th_buf.gnu_longname)
|
||||||
- return t->th_buf.gnu_longname;
|
- return t->th_buf.gnu_longname;
|
||||||
+ return safer_name_suffix(t->th_buf.gnu_longname);
|
+ return safer_name_suffix(t->th_buf.gnu_longname);
|
||||||
|
|
||||||
/* allocate the th_pathname buffer if not already */
|
/* allocate the th_pathname buffer if not already */
|
||||||
if (t->th_pathname == NULL)
|
if (t->th_pathname == NULL)
|
||||||
@@ -51,7 +80,7 @@ th_get_pathname(TAR *t)
|
@@ -50,7 +79,7 @@ th_get_pathname(TAR *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* will be deallocated in tar_close() */
|
/* will be deallocated in tar_close() */
|
||||||
- return t->th_pathname;
|
- return t->th_pathname;
|
||||||
+ return safer_name_suffix(t->th_pathname);
|
+ return safer_name_suffix(t->th_pathname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
--- a/lib/extract.c
|
--- a/lib/extract.c
|
||||||
+++ b/lib/extract.c
|
+++ b/lib/extract.c
|
||||||
@@ -298,14 +298,14 @@ tar_extract_hardlink(TAR * t, char *real
|
@@ -302,14 +302,14 @@ tar_extract_hardlink(TAR * t, char *real
|
||||||
if (mkdirhier(dirname(filename)) == -1)
|
if (mkdirhier(dirname(filename)) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
libtar_hashptr_reset(&hp);
|
libtar_hashptr_reset(&hp);
|
||||||
- if (libtar_hash_getkey(t->h, &hp, th_get_linkname(t),
|
- if (libtar_hash_getkey(t->h, &hp, th_get_linkname(t),
|
||||||
+ if (libtar_hash_getkey(t->h, &hp, safer_name_suffix(th_get_linkname(t)),
|
+ if (libtar_hash_getkey(t->h, &hp, safer_name_suffix(th_get_linkname(t)),
|
||||||
(libtar_matchfunc_t)libtar_str_match) != 0)
|
(libtar_matchfunc_t)libtar_str_match) != 0)
|
||||||
{
|
{
|
||||||
lnp = (char *)libtar_hashptr_data(&hp);
|
lnp = (char *)libtar_hashptr_data(&hp);
|
||||||
linktgt = &lnp[strlen(lnp) + 1];
|
linktgt = &lnp[strlen(lnp) + 1];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
- linktgt = th_get_linkname(t);
|
- linktgt = th_get_linkname(t);
|
||||||
+ linktgt = safer_name_suffix(th_get_linkname(t));
|
+ linktgt = safer_name_suffix(th_get_linkname(t));
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf(" ==> extracting: %s (link to %s)\n", filename, linktgt);
|
printf(" ==> extracting: %s (link to %s)\n", filename, linktgt);
|
||||||
@@ -343,9 +343,9 @@ tar_extract_symlink(TAR *t, char *realna
|
@@ -347,9 +347,9 @@ tar_extract_symlink(TAR *t, char *realna
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf(" ==> extracting: %s (symlink to %s)\n",
|
printf(" ==> extracting: %s (symlink to %s)\n",
|
||||||
- filename, th_get_linkname(t));
|
- filename, th_get_linkname(t));
|
||||||
+ filename, safer_name_suffix(th_get_linkname(t)));
|
+ filename, safer_name_suffix(th_get_linkname(t)));
|
||||||
#endif
|
#endif
|
||||||
- if (symlink(th_get_linkname(t), filename) == -1)
|
- if (symlink(th_get_linkname(t), filename) == -1)
|
||||||
+ if (symlink(safer_name_suffix(th_get_linkname(t)), filename) == -1)
|
+ if (symlink(safer_name_suffix(th_get_linkname(t)), filename) == -1)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
perror("symlink()");
|
perror("symlink()");
|
||||||
--- a/lib/internal.h
|
--- a/lib/internal.h
|
||||||
+++ b/lib/internal.h
|
+++ b/lib/internal.h
|
||||||
@@ -21,3 +21,4 @@
|
@@ -21,3 +21,4 @@
|
||||||
|
@ -99,15 +99,15 @@ Forwarded: yes
|
||||||
+char* safer_name_suffix(char const*);
|
+char* safer_name_suffix(char const*);
|
||||||
--- a/lib/output.c
|
--- a/lib/output.c
|
||||||
+++ b/lib/output.c
|
+++ b/lib/output.c
|
||||||
@@ -123,9 +123,9 @@ th_print_long_ls(TAR *t)
|
@@ -124,9 +124,9 @@ th_print_long_ls(TAR *t)
|
||||||
else
|
else
|
||||||
printf(" link to ");
|
printf(" link to ");
|
||||||
if ((t->options & TAR_GNU) && t->th_buf.gnu_longlink != NULL)
|
if ((t->options & TAR_GNU) && t->th_buf.gnu_longlink != NULL)
|
||||||
- printf("%s", t->th_buf.gnu_longlink);
|
- printf("%s", t->th_buf.gnu_longlink);
|
||||||
+ printf("%s", safer_name_suffix(t->th_buf.gnu_longlink));
|
+ printf("%s", safer_name_suffix(t->th_buf.gnu_longlink));
|
||||||
else
|
else
|
||||||
- printf("%.100s", t->th_buf.linkname);
|
- printf("%.100s", t->th_buf.linkname);
|
||||||
+ printf("%.100s", safer_name_suffix(t->th_buf.linkname));
|
+ printf("%.100s", safer_name_suffix(t->th_buf.linkname));
|
||||||
}
|
}
|
||||||
|
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
|
|
Loading…
Add table
Reference in a new issue