Date: Fri, 03 Mar 2023 00:24:10 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 269688] memalign() produces division by zero if alignment is 0 Message-ID: <bug-269688-227-e53T72cbQh@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-269688-227@https.bugs.freebsd.org/bugzilla/> References: <bug-269688-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269688 --- Comment #7 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D1b1d2aea020e88b3d2076207b13fec3ad= de42aa9 commit 1b1d2aea020e88b3d2076207b13fec3adde42aa9 Author: Paul Floyd <pjfloyd@wanadoo.fr> AuthorDate: 2023-02-24 16:29:01 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-03-03 00:23:24 +0000 libc: handle zero alignment in memalign() For compatibility with glibc. The previous code would trigger a division by zero in roundup() and terminate. Instead, just pass through to malloc() for align =3D=3D 0. PR: 269688 Reviewed by: imp, mjg MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/655 (cherry picked from commit 2c709ee70ade9fd8f77b37917a4169d667dda41d) lib/libc/gen/memalign.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269688-227-e53T72cbQh>