diff options
author | Petr Vorel <petr.vorel@gmail.com> | 2017-10-13 15:57:17 +0200 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2017-10-16 09:24:11 -0700 |
commit | 24b058a2a4f5248becc3c148637a3644d11a65a9 (patch) | |
tree | 517ed3b6cd2d4526f06a400fa5af43e14edcde64 /include | |
parent | e6849a5722dc248a1fe0519c97094000ded3849c (diff) | |
download | platform_external_iproute2-24b058a2a4f5248becc3c148637a3644d11a65a9.tar.gz platform_external_iproute2-24b058a2a4f5248becc3c148637a3644d11a65a9.tar.bz2 platform_external_iproute2-24b058a2a4f5248becc3c148637a3644d11a65a9.zip |
color: Fix another ip segfault when using --color switch
Commit 959f1428 ("color: add new COLOR_NONE and disable_color function")
introducing color enum COLOR_NONE, which is not only duplicite of
COLOR_CLEAR, but also caused segfault, when running ip with --color
switch, as 'attr + 8' in color_fprintf() access array item out of
bounds. Thus removing it and restoring "magic" offset + 7.
Reproduce with:
$ ip -c a
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/color.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/color.h b/include/color.h index 1cd6f7d2..c183ef79 100644 --- a/include/color.h +++ b/include/color.h @@ -2,7 +2,6 @@ #define __COLOR_H__ 1 enum color_attr { - COLOR_NONE, COLOR_IFNAME, COLOR_MAC, COLOR_INET, |