diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-11-14 21:12:16 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-11-14 21:12:16 -0500 |
commit | 743d4fe35a8d6029bc0da10b5b3d9f095a07f2c1 (patch) | |
tree | 55d61030b25a8f82d156fd2e19a951d85f4457dc | |
parent | human_readable: resync with upstream busybox #590932 (diff) | |
download | portage-utils-743d4fe35a8d6029bc0da10b5b3d9f095a07f2c1.tar.gz portage-utils-743d4fe35a8d6029bc0da10b5b3d9f095a07f2c1.tar.bz2 portage-utils-743d4fe35a8d6029bc0da10b5b3d9f095a07f2c1.zip |
qpkg: fix bad pointer passing
Taking an address of a stack buffer doesn't do what we want.
Create a local variable to hold the address to pass down.
URL: https://bugs.gentoo.org/598974
Reported-by: Alexander Wetzel <alexander.wetzel@web.de>
-rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1356,6 +1356,7 @@ _q_static queue *get_vdb_atoms(int fullcpv) char buf[_Q_PATH_MAX]; char slot[_Q_PATH_MAX]; + char *slotp = slot; size_t slot_len; struct dirent **cat; @@ -1384,7 +1385,7 @@ _q_static queue *get_vdb_atoms(int fullcpv) * until this is rewritten & merged into libq/vdb.c. */ slot_len = sizeof(slot); strncat(buf, "/SLOT", sizeof(buf)); - eat_file_at(ctx->vdb_fd, buf, (char **)&slot, &slot_len); + eat_file_at(ctx->vdb_fd, buf, &slotp, &slot_len); rmspace(slot); if (fullcpv) { |