public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at redhat dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/1967] no parameter check in aio_return() in rt/aio_return.c Date: Fri, 02 Dec 2005 08:46:00 -0000 [thread overview] Message-ID: <20051202084618.19984.qmail@sourceware.org> (raw) In-Reply-To: <20051202083855.1967.heiko.nardmann@secunet.com> ------- Additional Comments From jakub at redhat dot com 2005-12-02 08:46 ------- Please stop with this. There are hundreds of such functions in glibc, and bad arguments are intentionally not checked in them, among other for performance reasons. http://www.opengroup.org/onlinepubs/009695399/functions/aio_return.html doesn't allow the aiocbp argument to be NULL, it must be a reference to a valid aiocb structure which NULL is not. From http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_03.html#tag_02_03 you can see that it is allowed to return -1 and EFAULT in errno in that case, but it is not guaranteed. Furthermore, even if you add a check for NULL, aio_return ((struct aiocb *)28); would still crash and there is really no difference between NULL and (struct aiocb *)28 as far as this function is concerned. Both are invalid arguments, triggering undefined behaviour. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID http://sourceware.org/bugzilla/show_bug.cgi?id=1967 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
prev parent reply other threads:[~2005-12-02 8:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-12-02 8:38 [Bug libc/1967] New: " heiko dot nardmann at secunet dot com 2005-12-02 8:40 ` [Bug libc/1967] " heiko dot nardmann at secunet dot com 2005-12-02 8:46 ` jakub at redhat dot com [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20051202084618.19984.qmail@sourceware.org \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).