summaryrefslogtreecommitdiff
path: root/core/pacman/replace-i686-by-pentium4-when-architecture-is-auto.patch
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-05-26 17:18:26 +0200
committerErich Eckner <git@eckner.net>2021-05-26 17:18:26 +0200
commite217e1b42f8f61eb71c81d9f6d05e64a34c3ae9f (patch)
treef3d3f20dddc88db782ad3464300456cd8fd78a19 /core/pacman/replace-i686-by-pentium4-when-architecture-is-auto.patch
parent889d5ee579890e1e5333e277eafecab8df2f8880 (diff)
downloadpackages-e217e1b42f8f61eb71c81d9f6d05e64a34c3ae9f.tar.xz
core/pacman: fix the sse2 patch once more ^^
Diffstat (limited to 'core/pacman/replace-i686-by-pentium4-when-architecture-is-auto.patch')
-rw-r--r--core/pacman/replace-i686-by-pentium4-when-architecture-is-auto.patch9
1 files changed, 5 insertions, 4 deletions
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);