]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/blob - src/patches/dmidecode/dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-2.x
[people/mfischer/ipfire-2.x.git] / src / patches / dmidecode / dmidecode-3.3-fix_the_condition_error_in_ascii_filter.patch
1 From 1117390ccd9cea139638db6f460bb6de70e28f94 Mon Sep 17 00:00:00 2001
2 From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
3 Date: Tue, 5 Jan 2021 10:36:29 +0100
4 Subject: dmidecode: Fix the condition error in ascii_filter
5
6 The normal printable ASCII range is 32 to 127 (not included),
7 so fix the error in this if condition.
8
9 Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
10 Signed-off-by: Jean Delvare <jdelvare@suse.de>
11 ---
12 dmidecode.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15 diff --git a/dmidecode.c b/dmidecode.c
16 index 27d5494..864a193 100644
17 --- a/dmidecode.c
18 +++ b/dmidecode.c
19 @@ -116,7 +116,7 @@ static void ascii_filter(char *bp, size_t len)
20 size_t i;
21
22 for (i = 0; i < len; i++)
23 - if (bp[i] < 32 || bp[i] == 127)
24 + if (bp[i] < 32 || bp[i] >= 127)
25 bp[i] = '.';
26 }
27
28 --
29 cgit v1.2.1
30