]> git.pld-linux.org Git - packages/liboil.git/commitdiff
- fix deadly typo in md5_asm3 impl, kill SEGV when proc not readable
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 21 Nov 2004 15:32:11 +0000 (15:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    liboil-fixes.patch -> 1.1

liboil-fixes.patch [new file with mode: 0644]

diff --git a/liboil-fixes.patch b/liboil-fixes.patch
new file mode 100644 (file)
index 0000000..2eb531a
--- /dev/null
@@ -0,0 +1,36 @@
+--- liboil-0.2.1/liboil/md5/md5_i386.c.orig    2004-11-07 22:37:36.000000000 +0100
++++ liboil-0.2.1/liboil/md5/md5_i386.c 2004-11-21 16:30:16.000000000 +0100
+@@ -354,7 +354,7 @@
+   asm (
+       "  mov %%ebp, 0x8(%%eax)\n"
+-      "  mov %%ebp, 0xc(%%eax)\n"
++      "  mov %%esp, 0xc(%%eax)\n"
+       "  mov %%eax, %%ebp\n"
+       "  mov (%%ebp), %%esi\n"
+       "  mov (%%esi), %%eax\n"
+--- liboil-0.2.1/liboil/liboilcpu.c.orig       2004-09-03 23:39:10.000000000 +0200
++++ liboil-0.2.1/liboil/liboilcpu.c    2004-11-21 15:48:43.000000000 +0100
+@@ -44,6 +44,7 @@
+   int fd;
+   int n;
++  if (cpuinfo == NULL) return NULL;
+   fd = open("/proc/cpuinfo", O_RDONLY);
+   if (fd < 0) return NULL;
+@@ -64,9 +65,13 @@
+   char **f;
+   cpuinfo = get_cpuinfo();
++  if (cpuinfo == NULL) return;
+   cpuinfo_flags = get_cpuinfo_flags_string(cpuinfo);
+-  if (cpuinfo_flags == NULL) return;
++  if (cpuinfo_flags == NULL) {
++    free(cpuinfo);
++    return;
++  }
+   flags = strsplit(cpuinfo_flags);
+   for (f = flags; *f; f++) {
This page took 0.078902 seconds and 4 git commands to generate.