linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: walter harms <wharms-fPG8STNUNVg@public.gmane.org>
To: David Malcolm <dmalcolm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] Quarantine "gets.3" into its own "do not use" manpage
Date: Tue, 19 Nov 2013 15:13:11 +0100	[thread overview]
Message-ID: <528B71F7.5070802@bfs.de> (raw)
In-Reply-To: <1384370434.15325.33.camel@surprise>



Am 13.11.2013 20:20, schrieb David Malcolm:
> Currently man3/gets.3 documents various safe I/O functions, along with
> the toxic "gets" function.
> 
> At the risk of being melodramatic, this strikes me as akin to storing
> rat poison in a food cabinet, in the same style of packaging as the
> food, but with a post-it note on it saying "see warnings below".
> 
> I think such "never use this" functions should be quarantined into their
> own manpages, rather than listing them alongside sane functions.
> 
> The attached patch does this for "gets", moving the documentation of the
> good functions from man3/gets.3 into man3/fgetc.3, updating the SO links
> in the relevant functions to point at the latter.
> 
> It then rewrites man3/gets.3 to spell out that "gets" is toxic and
> should never be used (with a link to CWE-242 for good measure).
> 
> Thoughts?
> Dave
> 
> [Note to self: I filed this downstream as:
> https://bugzilla.redhat.com/show_bug.cgi?id=1030030 ]
> 
> 

This is a good idea, it would also be helpful to have a list of
do-not-use function *including* the rational why in its own page.
We already have pages like 'undocumented' so it is not uniq.

re,
 wh


--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-11-19 14:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 19:20 [PATCH] Quarantine "gets.3" into its own "do not use" manpage David Malcolm
2013-11-15 18:54 ` Andre Majorel
     [not found]   ` <20131115185455.GA20757-956IwFboN44acnK+F/IuxqxOck334EZe@public.gmane.org>
2013-12-31  9:35     ` Michael Kerrisk (man-pages)
2013-11-19 14:13 ` walter harms [this message]
2013-12-31  9:31 ` Michael Kerrisk (man-pages)

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=528B71F7.5070802@bfs.de \
    --to=wharms-fpg8stnunvg@public.gmane.org \
    --cc=dmalcolm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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 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 NNTP newsgroup(s).