mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-26 04:35:39 +03:00
- add fixes for CVE-2016-2037, integer overflow and inconsistent argument passing to printf-like functions, all from upstream. - add autoconf to checkdepends as autom4te is required to create built-in tests from templates; - remove bash from checkdepends (as it is useless without passing CONFIG_SHELL=/bin/bash to ./configure anyway) and replace the bash-style sequence expression at tests/symlink-long.at:30 to resolve test failure; - disable NLS and make explicit other default ./configure options.
81 lines
2.4 KiB
Diff
81 lines
2.4 KiB
Diff
commit 3be097c12ec14a69b3f3df3e2138fa235a3154d7
|
|
Author: Sergey Poznyakoff <gray@gnu.org>
|
|
Date: Sat Dec 1 12:01:21 2018 +0200
|
|
|
|
Minor fixes
|
|
|
|
* src/copyin.c: Remove unused variable.
|
|
* src/util.c: Cast arguments to printf.
|
|
|
|
diff --git a/src/copyin.c b/src/copyin.c
|
|
index ba887ae..a01873d 100644
|
|
--- a/src/copyin.c
|
|
+++ b/src/copyin.c
|
|
@@ -844,14 +844,14 @@ from_ascii (char const *where, size_t digs, unsigned logbase)
|
|
char *p = strchr (codetab, toupper (*buf));
|
|
if (!p)
|
|
{
|
|
- error (0, 0, _("Malformed number %.*s"), digs, where);
|
|
+ error (0, 0, _("Malformed number %.*s"), (int) digs, where);
|
|
break;
|
|
}
|
|
|
|
d = p - codetab;
|
|
if ((d >> logbase) > 1)
|
|
{
|
|
- error (0, 0, _("Malformed number %.*s"), digs, where);
|
|
+ error (0, 0, _("Malformed number %.*s"), (int) digs, where);
|
|
break;
|
|
}
|
|
value += d;
|
|
@@ -862,7 +862,7 @@ from_ascii (char const *where, size_t digs, unsigned logbase)
|
|
}
|
|
if (overflow)
|
|
error (0, 0, _("Archive value %.*s is out of range"),
|
|
- digs, where);
|
|
+ (int) digs, where);
|
|
return value;
|
|
}
|
|
|
|
diff --git a/src/util.c b/src/util.c
|
|
index 4e49124..7303240 100644
|
|
--- a/src/util.c
|
|
+++ b/src/util.c
|
|
@@ -498,8 +498,9 @@ copy_files_disk_to_tape (int in_des, int out_des, off_t num_bytes,
|
|
filename, STRINGIFY_BIGINT (num_bytes, buf));
|
|
}
|
|
else
|
|
- error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
|
|
- original_num_bytes - num_bytes, filename);
|
|
+ error (0, 0,
|
|
+ _("Read error at byte %lld in file %s, padding with zeros"),
|
|
+ (long long) (original_num_bytes - num_bytes), filename);
|
|
write_nuls_to_file (num_bytes, out_des, tape_buffered_write);
|
|
break;
|
|
}
|
|
@@ -548,8 +549,9 @@ copy_files_disk_to_disk (int in_des, int out_des, off_t num_bytes,
|
|
filename, STRINGIFY_BIGINT (num_bytes, buf));
|
|
}
|
|
else
|
|
- error (0, 0, _("Read error at byte %lld in file %s, padding with zeros"),
|
|
- original_num_bytes - num_bytes, filename);
|
|
+ error (0, 0,
|
|
+ _("Read error at byte %lld in file %s, padding with zeros"),
|
|
+ (long long) (original_num_bytes - num_bytes), filename);
|
|
write_nuls_to_file (num_bytes, out_des, disk_buffered_write);
|
|
break;
|
|
}
|
|
@@ -599,13 +601,11 @@ void
|
|
create_all_directories (char *name)
|
|
{
|
|
char *dir;
|
|
- int mode;
|
|
#ifdef HPUX_CDF
|
|
int cdf;
|
|
#endif
|
|
|
|
dir = dir_name (name);
|
|
- mode = 0700;
|
|
#ifdef HPUX_CDF
|
|
cdf = islastparentcdf (name);
|
|
if (cdf)
|