diff options
author | 2001-01-26 20:41:55 +0000 | |
---|---|---|
committer | 2001-01-26 20:41:55 +0000 | |
commit | b294be00684e4253a9b3ecd491a2fed9c3633efc (patch) | |
tree | 275c4289ebdce75cb12ad5739971e8010f1d83fa | |
parent | Mention that shutdown brings the system to single user mode when issued (diff) | |
download | wireguard-openbsd-b294be00684e4253a9b3ecd491a2fed9c3633efc.tar.xz wireguard-openbsd-b294be00684e4253a9b3ecd491a2fed9c3633efc.zip |
Fix for PR1643; constrain indices into "table" to be < table_size
so we don't go off and return random, unallocated bits.
-rw-r--r-- | usr.bin/less/position.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/less/position.c b/usr.bin/less/position.c index 7778d0867a1..dcf1eb49c8b 100644 --- a/usr.bin/less/position.c +++ b/usr.bin/less/position.c @@ -56,6 +56,9 @@ extern int sc_width, sc_height; position(where) int where; { + if (where >= table_size) + where = BOTTOM; + switch (where) { case BOTTOM: |