From f2505ce4aac37067f644646d973eeb382d8db6ec Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 26 Aug 2008 13:24:35 +0200 Subject: [PATCH] Let filters accept vendor and device 0xffff. Thanks to Sebastian Herbszt for a bug report. --- lib/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/filter.c b/lib/filter.c index eb375c4..2bedc95 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -90,14 +90,14 @@ pci_filter_parse_id(struct pci_filter *f, char *str) if (str[0] && strcmp(str, "*")) { long int x = strtol(str, &e, 16); - if ((e && *e) || (x < 0 || x >= 0xffff)) + if ((e && *e) || (x < 0 || x > 0xffff)) return "Invalid vendor ID"; f->vendor = x; } if (s[0] && strcmp(s, "*")) { long int x = strtol(s, &e, 16); - if ((e && *e) || (x < 0 || x >= 0xffff)) + if ((e && *e) || (x < 0 || x > 0xffff)) return "Invalid device ID"; f->device = x; } -- 2.39.5