diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-04-19 13:09:56 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-04-19 13:09:56 +0300 |
commit | 69f9c0126aad8b67e5ef8731337d2b901b143291 (patch) | |
tree | 7ac7138852c3882a249689e741d2ab010da932d3 /main/musl | |
parent | 1267385a781361be65d8af662f215fbc43b9476b (diff) | |
download | aports-69f9c0126aad8b67e5ef8731337d2b901b143291.tar.bz2 aports-69f9c0126aad8b67e5ef8731337d2b901b143291.tar.xz |
main/musl: cherry-pick upstream fix, fix recently added getconf names
Diffstat (limited to 'main/musl')
-rw-r--r-- | main/musl/0001-fix-false-negatives-with-periodic-needles-in-strstr-.patch | 59 | ||||
-rw-r--r-- | main/musl/APKBUILD | 12 | ||||
-rw-r--r-- | main/musl/getconf.c | 4 |
3 files changed, 69 insertions, 6 deletions
diff --git a/main/musl/0001-fix-false-negatives-with-periodic-needles-in-strstr-.patch b/main/musl/0001-fix-false-negatives-with-periodic-needles-in-strstr-.patch new file mode 100644 index 0000000000..162a72a596 --- /dev/null +++ b/main/musl/0001-fix-false-negatives-with-periodic-needles-in-strstr-.patch @@ -0,0 +1,59 @@ +From 476cd1d96560aaf7f210319597556e7fbcd60469 Mon Sep 17 00:00:00 2001 +From: Rich Felker <dalias@aerifal.cx> +Date: Fri, 18 Apr 2014 17:38:35 -0400 +Subject: [PATCH] fix false negatives with periodic needles in strstr, wcsstr, + and memmem + +in cases where the memorized match range from the right factor +exceeded the length of the left factor, it was wrongly treated as a +mismatch rather than a match. + +issue reported by Yves Bastide. +--- + src/string/memmem.c | 2 +- + src/string/strstr.c | 2 +- + src/string/wcsstr.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/string/memmem.c b/src/string/memmem.c +index a5a249f..3b1ae18 100644 +--- a/src/string/memmem.c ++++ b/src/string/memmem.c +@@ -120,7 +120,7 @@ static char *twoway_memmem(const unsigned char *h, const unsigned char *z, const + } + /* Compare left half */ + for (k=ms+1; k>mem && n[k-1] == h[k-1]; k--); +- if (k == mem) return (char *)h; ++ if (k <= mem) return (char *)h; + h += p; + mem = mem0; + } +diff --git a/src/string/strstr.c b/src/string/strstr.c +index 915c0a2..cd06912 100644 +--- a/src/string/strstr.c ++++ b/src/string/strstr.c +@@ -130,7 +130,7 @@ static char *twoway_strstr(const unsigned char *h, const unsigned char *n) + } + /* Compare left half */ + for (k=ms+1; k>mem && n[k-1] == h[k-1]; k--); +- if (k == mem) return (char *)h; ++ if (k <= mem) return (char *)h; + h += p; + mem = mem0; + } +diff --git a/src/string/wcsstr.c b/src/string/wcsstr.c +index 3e28e28..4caaef3 100644 +--- a/src/string/wcsstr.c ++++ b/src/string/wcsstr.c +@@ -84,7 +84,7 @@ static wchar_t *twoway_wcsstr(const wchar_t *h, const wchar_t *n) + } + /* Compare left half */ + for (k=ms+1; k>mem && n[k-1] == h[k-1]; k--); +- if (k == mem) return (wchar_t *)h; ++ if (k <= mem) return (wchar_t *)h; + h += p; + mem = mem0; + } +-- +1.9.2 + diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD index b7ad4cea27..64f693010d 100644 --- a/main/musl/APKBUILD +++ b/main/musl/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Timo Teräs <timo.teras@iki.fi> pkgname=musl pkgver=1.1.0 -pkgrel=1 +pkgrel=2 pkgdesc="the musl c library (libc) implementation" url="http://www.musl-libc.org/" arch="all" @@ -14,6 +14,7 @@ install="" subpackages="$pkgname-dev $pkgname-utils" [ "${CTARGET#*musl}" = "$CTARGET" ] && subpackages="$subpackages musl-gcc:crosstool" source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz + 0001-fix-false-negatives-with-periodic-needles-in-strstr-.patch 1001-add-basic-dns-record-parsing-functions.patch 1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch @@ -124,26 +125,29 @@ crosstool() { } md5sums="c2118c3b6afc77f46a0b23a38a8c3080 musl-1.1.0.tar.gz +68aad2b2b61da0d2f189d29724a9f07f 0001-fix-false-negatives-with-periodic-needles-in-strstr-.patch a3810683ef61ac27e2f6ec9801280c81 1001-add-basic-dns-record-parsing-functions.patch 83c3bd2a50b1de5ef948704d3f4e0583 1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch 61c6c1e84ed1df82abbe6d75e90cf21c getopt_long.c 0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c -abf2cfea8e8cbca6a8f76e0cf33bbdf4 getconf.c +dae8a31f47488273d8465c785bd77a00 getconf.c 2b941c4251cac44988a4abfc50e21267 getent.c 170ce44d0eca4bcfebdf402f21af5f71 iconv.c" sha256sums="de1b43019e5361d7577e5e0213e9dde591853e9da5d4a7cd75e2e0d78bf60820 musl-1.1.0.tar.gz +d55586f436af5ea2555f848b2e1a1aeed89786d3ec76b4cedcceec3d78a64d31 0001-fix-false-negatives-with-periodic-needles-in-strstr-.patch 758390768b1bc4159d56908ca332b9640cd0552ed3b4b2b8d4a6d499c54c11a1 1001-add-basic-dns-record-parsing-functions.patch 1c25880095e869b827f02997e864fdf4bf157a4e923e52d97dbd05e657aedb70 1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch d9b644ec20bc33e81a7c52b9fcf7973d835923a69faf50f03db45534b811bd96 getopt_long.c 299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c -50ad8fa30434cdfc23107a1df1cb3274a6263f3531bc4db870c0a86192507737 getconf.c +e3d1e1f82d1319d9be4726a32dfbe08ab8c23aceaa5e6b667cb391f70a467a1e getconf.c 68373a55e89ce85c562d941ccf588337d6cc6c9c17689d695f65cd7607134bbe getent.c c24f1da0bdb201d0689efcf257d2146209cb036c313436d76ca80984ace01b0c iconv.c" sha512sums="72dab085fa56a2f02d407074b9a4c1d409624df74924ed385b174a767113aa0a4112bd22d3eaf465b31a14b8e60a15997d6042421994673977de306ee8738b3d musl-1.1.0.tar.gz +d12c4ba139c43650e7a7aa70df23da2b9d5786be199c3103d2c246718d296cbde593d90743ee4ff8681c64a129be85a8d12c0b819da092d130e67dd00fc54482 0001-fix-false-negatives-with-periodic-needles-in-strstr-.patch dad965258daf69371b844f76bfe5a914b0eca0ca76f3fc340b8fd7acf598b5f87bbe6d68b1f43ed0293ee0ed3bfd85d5173ccc169aa6265646248d5b8a906708 1001-add-basic-dns-record-parsing-functions.patch 72cf33738d2cf31f6ec02312bc494d754c17470b519172bb8bd7e2e29ac3b119023088a2b3fbc0dbc2fddd0078ccbae62096106cae361f8c31d6a9950043af25 1002-reimplement-if_nameindex-and-getifaddrs-using-netlin.patch 140f3f20d30bd95ebce8c41b8cc7f616c6cbedf4ea06c729c21014e74f6043796825cc40ebc5180620ea38173afdba23f09ebf6d8b11fa05440b14d23764fca9 getopt_long.c 062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c -2cd55186c01877d50ea2e157633cad44dc49c989b856ae3da6361a040043ff3470bb46354b889e430d618759fcc493db09eeb611ce5211d7a2e92497444a1f38 getconf.c +04ead14ff557d71153457b7f55c4b3ecb7594f91e01a9319a6ad0056010570cbc69680d82a7bf9c977c8bb382cfbb7cd6bf79f8fbceadf0a0f9f77812f32a324 getconf.c b35de9847353b273516162ed4828a810c6130fc5b7de44ee4433003b3f99647b25792d9b1c40dfc67069add11f3fb850e5c35d4f1912dccac108059bbbdfd5a2 getent.c cef7a6c35c909c70f49935cc84d9e675ff7b63979c222e08f3a70e3f7792607c73f28e8048d61c89f34e13b0144e79e374b73d1727419f6b7c98471c2c338077 iconv.c" diff --git a/main/musl/getconf.c b/main/musl/getconf.c index 683dd7ce31..0c698bc5e3 100644 --- a/main/musl/getconf.c +++ b/main/musl/getconf.c @@ -168,8 +168,8 @@ static const struct conf_variable conf_table[] = { "GETPW_R_SIZE_MAX", SYSCONF, _SC_GETPW_R_SIZE_MAX }, /* Commonly provided extensions */ - { "_SC_PHYS_PAGES", SYSCONF, _SC_PHYS_PAGES }, - { "_SC_AVPHYS_PAGES", SYSCONF, _SC_AVPHYS_PAGES }, + { "_PHYS_PAGES", SYSCONF, _SC_PHYS_PAGES }, + { "_AVPHYS_PAGES", SYSCONF, _SC_AVPHYS_PAGES }, { "_NPROCESSORS_CONF", SYSCONF, _SC_NPROCESSORS_CONF }, { "_NPROCESSORS_ONLN", SYSCONF, _SC_NPROCESSORS_ONLN }, |