This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v6 12/16] RISC-V: Linux ABI
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Palmer Dabbelt <palmer at dabbelt dot com>
- Cc: <libc-alpha at sourceware dot org>, <patches at groups dot riscv dot org>, Andrew Waterman <andrew at sifive dot com>, <dj at redhat dot com>, Darius Rad <darius at bluespec dot com>
- Date: Fri, 26 Jan 2018 12:32:44 +0000
- Subject: Re: [PATCH v6 12/16] RISC-V: Linux ABI
- Authentication-results: sourceware.org; auth=none
- References: <20180126054443.22702-1-palmer@dabbelt.com> <20180126054443.22702-13-palmer@dabbelt.com>
On Thu, 25 Jan 2018, Palmer Dabbelt wrote:
> + if (len >= 4 && ! memcmp(path + len - 4, "/lib", 4)) \
> + { \
> + memcpy (path + len, "64/lp64d", 10); \
> + add_dir (path); \
> + memcpy (path + len, "64/lp64", 9); \
> + add_dir (path); \
Off-by-one errors in the amount copied, "64/lp64d" is 9 bytes including
trailing NUL and "64/lp64" is 8 bytes. (In turn this means path actually
only needs dimension [len + 9].
--
Joseph S. Myers
joseph@codesourcery.com