zsh-workers
 help / color / mirror / code / Atom feed
* PATH_MAX used dangerously -- do we care?
@ 1996-07-07 16:34 Bart Schaefer
  1996-07-09  0:40 ` Zoltan Hidvegi
  0 siblings, 1 reply; 7+ messages in thread
From: Bart Schaefer @ 1996-07-07 16:34 UTC (permalink / raw)
  To: zsh-workers

I can find at least half a dozen places where some form of user input is
sprintf'd or strcpy'd into a PATH_MAX-sized stack buffer or static buffer.
The most obvious one is in sourcehome() in init.c, where $ZDOTDIR plus a
slash and file name is sprintf'd into such a buffer.

In all cases I found, the string being placed in the buffer really is a
path name, so PATH_MAX is a reasonable limit upon it; so I don't suggest
switching to dynamic buffers, but shouldn't there be a bounds check?

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1996-07-25 21:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-07 16:34 PATH_MAX used dangerously -- do we care? Bart Schaefer
1996-07-09  0:40 ` Zoltan Hidvegi
1996-07-24 18:43   ` Bart Schaefer
1996-07-25 20:13     ` Zoltan Hidvegi
1996-07-25 20:52       ` Bart Schaefer
1996-07-25 20:58         ` Zoltan Hidvegi
1996-07-25 21:12           ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).