diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2013-07-20 08:33:00 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2013-07-20 08:33:00 -0700 |
commit | 6496aec9e948e0e5e6646aff408391d78f3516cc (patch) | |
tree | d3e3afc92e5189ef1b1a8d2814965f003c13f96f /lisp/emacs-lisp | |
parent | b2a069c2f80cb2fdd683f5e044642b058c4d2326 (diff) | |
download | emacs-6496aec9e948e0e5e6646aff408391d78f3516cc.tar.gz emacs-6496aec9e948e0e5e6646aff408391d78f3516cc.tar.bz2 emacs-6496aec9e948e0e5e6646aff408391d78f3516cc.zip |
Fix array bounds violation when pty allocation fails.
* configure.ac (PTY_TTY_NAME_SPRINTF): Use PTY_NAME_SIZE,
not sizeof pty_name, since pty_name is now a pointer to the array.
* src/process.c (PTY_NAME_SIZE): New constant.
(pty_name): Remove static variable; it's now auto.
(allocate_pty): Define even if !HAVE_PTYS; that's simpler.
Take pty_name as an arg rather than using a static variable.
All callers changed.
(create_process): Recover pty_flag from process, not from volatile local.
(create_pty): Stay inside array even when pty allocation fails.
(Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions