diff options
author | Michael Elkins <me@sigpipe.org> | 2010-08-08 14:52:50 -0700 |
---|---|---|
committer | Michael Elkins <me@sigpipe.org> | 2010-08-08 14:52:50 -0700 |
commit | d8e7ea48dc48db500990ad0d752972a06c0bbed8 (patch) | |
tree | 003a4723d5965086e823eef7ab062b24fc4105fc | |
parent | c6dbd9fb05e45450279f382b3bd6658700a69cd2 (diff) |
fix buffer underrun when processing ANSI escape sequences
closes #3371
-rw-r--r-- | pager.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1057,7 +1057,7 @@ fill_buffer (FILE *f, LOFF_T *last_pos, LOFF_T offset, unsigned char **buf, { if (*(p+1) == '_') /* underline */ p += 2; - else if (*(p+1)) /* bold or overstrike */ + else if (*(p+1) && q > *fmt) /* bold or overstrike */ { *(q-1) = *(p+1); p += 2; |