diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2017-02-09 17:28:54 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-02-09 17:28:54 +0100 |
commit | 58520986c38e34db60e07260c64c563e3efcf353 (patch) | |
tree | 58e82d735221aba2766d43cb72864aaa26100746 /elf/dl-tunables.c | |
parent | db0242e3023436757bbc7c488a779e6e3343db04 (diff) | |
download | glibc-58520986c38e34db60e07260c64c563e3efcf353.zip glibc-58520986c38e34db60e07260c64c563e3efcf353.tar.gz glibc-58520986c38e34db60e07260c64c563e3efcf353.tar.bz2 |
Fix getting tunable values on big-endian (BZ #21109)
The code to set value passed a tunable_val_t, which when cast to
int32_t on big-endian gives the wrong value. Instead, use
tunable_val_t.numval instead, which can then be safely cast into
int32_t.
(cherry picked from commit 8cbc826c37c0221ada65a7a622fe079b4e89a4b0)
Diffstat (limited to 'elf/dl-tunables.c')
-rw-r--r-- | elf/dl-tunables.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c index a8d53d6..e42aa67 100644 --- a/elf/dl-tunables.c +++ b/elf/dl-tunables.c @@ -455,6 +455,8 @@ __tunable_set_val (tunable_id_t id, void *valp, tunable_callback_t callback) if (cur->strval == NULL) return; + /* Caller does not need the value, just call the callback with our tunable + value. */ if (valp == NULL) goto cb; |