summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/pacman/PKGBUILD2
-rw-r--r--core/pacman/replace-i686-by-pentium4-when-architecture-is-auto.patch9
2 files changed, 6 insertions, 5 deletions
diff --git a/core/pacman/PKGBUILD b/core/pacman/PKGBUILD
index 22f66813..fa05afd7 100644
--- a/core/pacman/PKGBUILD
+++ b/core/pacman/PKGBUILD
@@ -24,7 +24,7 @@ if [ ! "${CARCH}" = "i686" ]; then
fi
source+=('replace-i686-by-pentium4-when-architecture-is-auto.patch')
-sha256sums+=('0c73e8d94d164a58cbd7e52987ec4f2dd9ab9b64518db5b602bf615da0ef9764')
+sha256sums+=('f866cfe3df0108dba7e9468dbe11a29974f35ab3d6a65d7be67d2112adb1ce10')
eval "$(
{
diff --git a/core/pacman/replace-i686-by-pentium4-when-architecture-is-auto.patch b/core/pacman/replace-i686-by-pentium4-when-architecture-is-auto.patch
index 7e51a7ac..909a52d3 100644
--- a/core/pacman/replace-i686-by-pentium4-when-architecture-is-auto.patch
+++ b/core/pacman/replace-i686-by-pentium4-when-architecture-is-auto.patch
@@ -24,7 +24,7 @@ index 0f0c2cfb..b05c456d 100644
arch = newarch;
}
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
-index 7e810127..ab9ee5c9 100644
+index 7e810127..2a50fa4b 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -26,6 +26,7 @@
@@ -35,12 +35,13 @@ index 7e810127..ab9ee5c9 100644
#include <ctype.h> /* isspace */
#include <limits.h>
#include <getopt.h>
-@@ -274,8 +275,18 @@ static void setuseragent(void)
+@@ -274,8 +275,19 @@ static void setuseragent(void)
int len;
uname(&un);
-+ char machine[8];
-+ strncpy(machine, un.machine, 8);
++ char machine[9];
++ strncpy(machine, un.machine, sizeof machine);
++ machine[sizeof machine-1] = '\0';
+ if(strcmp(machine, "i686") == 0) {
+ int eax, ebx, ecx, edx;
+ __get_cpuid(1, &eax, &ebx, &ecx, &edx);