From: "Aurélien Aptel" <aaptel@suse.com>
To: Bernhard Voelker <mail@bernhard-voelker.de>,
Sami Kerola <kerolasa@iki.fi>,
util-linux@vger.kernel.org
Subject: Re: [PATCH] newgrp: use libc explicit_bzero() when it is available
Date: Mon, 09 Jan 2017 15:31:54 +0100 [thread overview]
Message-ID: <mpseg0cl2xx.fsf@suse.com> (raw)
In-Reply-To: <4462d609-2049-7484-d6a8-53daf9b4534f@bernhard-voelker.de>
Bernhard Voelker <mail@bernhard-voelker.de> writes:
> Do you think it's worth making things even more complicated
> for overwriting a simple string? I mean, a simple
>
> for (char *c = xpwd; c; c++)
> c = '\0';
>
> would do, wouldn't it?
Play around with this example:
https://godbolt.org/g/SOSqt2
Compilers are pretty good at eliminated dead code as soon as you enable
optimizations nowadays, it's actually not that easy.
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
next prev parent reply other threads:[~2017-01-09 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-05 22:33 [PATCH] newgrp: use libc explicit_bzero() when it is available Sami Kerola
2017-01-06 11:09 ` Bernhard Voelker
2017-01-06 12:15 ` Rüdiger Meier
2017-01-09 14:31 ` Aurélien Aptel [this message]
2017-01-16 11:31 ` Karel Zak
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=mpseg0cl2xx.fsf@suse.com \
--to=aaptel@suse.com \
--cc=kerolasa@iki.fi \
--cc=mail@bernhard-voelker.de \
--cc=util-linux@vger.kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.