glibc/glibc-sw13618-2.patch
Stephan Kulow 7f152ecbf8 Accepting request 114164 from Base:System
Lots of fixes for glibc and cleanup of spec file. (forwarded request 114163 from a_jaeger)

OBS-URL: https://build.opensuse.org/request/show/114164
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=105
2012-04-18 10:34:21 +00:00

30 lines
799 B
Diff

Index: glibc-2.15/elf/dl-open.c
===================================================================
--- glibc-2.15.orig/elf/dl-open.c
+++ glibc-2.15/elf/dl-open.c
@@ -326,7 +326,7 @@ dl_open_worker (void *a)
while (l != NULL);
if (nmaps > 1)
{
- char seen[nmaps];
+ uint16_t seen[nmaps];
memset (seen, '\0', nmaps);
size_t i = 0;
while (1)
@@ -352,13 +352,13 @@ dl_open_worker (void *a)
(k - i) * sizeof (maps[0]));
maps[k] = thisp;
- if (seen[i + 1] > 1)
+ if (seen[i + 1] > nmaps - i)
{
++i;
goto next_clear;
}
- char this_seen = seen[i];
+ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1],
(k - i) * sizeof (seen[0]));
seen[k] = this_seen;