mirror of
https://github.com/vim/vim.git
synced 2025-11-15 23:14:06 -05:00
patch 9.1.1683: xxd: Avoid null dereference in autoskip colorless
Problem: xxd: Avoid null dereference in autoskip colorless
Solution: Verify that colors is not null (Joakim Nohlgård)
Fixes bug introduced in 6897f18ee6
(v9.1.1459) which does a memcpy from NULL when color=never and the
autoskip option is used.
Before:
dd if=/dev/zero bs=100 count=1 status=none | xxd -a -R never
00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................
Segmentation fault (core dumped)
After:
dd if=/dev/zero bs=100 count=1 status=none | ./xxd/xxd -a -R never
00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................
*
00000060: 0000 0000 ....
closes: #18008
Signed-off-by: Joakim Nohlgård <joakim@nohlgard.se>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
99964e2ea7
commit
b922b30cfe
@@ -724,6 +724,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1683,
|
||||
/**/
|
||||
1682,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user