HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e2f2e9
)
(tputs): Don't let ospeed overrun the speeds array.
author
David J. MacKenzie
<djm@gnu.org>
Thu, 30 Nov 1995 20:05:01 +0000
(20:05 +0000)
committer
David J. MacKenzie
<djm@gnu.org>
Thu, 30 Nov 1995 20:05:01 +0000
(20:05 +0000)
src/termcap.c
patch
|
blob
|
blame
|
history
diff --git
a/src/termcap.c
b/src/termcap.c
index
595fc42
..
26a1229
100644
(file)
--- a/
src/termcap.c
+++ b/
src/termcap.c
@@
-300,8
+300,10
@@
tputs (str, nlines, outfun)
#else
if (ospeed == 0)
speed = tputs_baud_rate;
- else
+ else
if (ospeed > 0 && ospeed < (sizeof speeds / sizeof speeds[0]))
speed = speeds[ospeed];
+ else
+ speed = 0;
#endif
if (!str)