From 455bfecdffcfb92a91f6a9eaecfff02cb7cfa0c2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 5 Oct 2020 10:33:28 -0700 Subject: [PATCH] driconf: Make sure that the range check on the defaults actually works. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 8a05d6ffc65d ("driconf: Make the driver's declarations be structs instead of XML.") Reviewed-by: Michel Dänzer Reviewed-by: Marek Olšák Part-of: --- src/util/xmlconfig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/xmlconfig.c b/src/util/xmlconfig.c index a80be8a7fa0..b00ae109eb7 100644 --- a/src/util/xmlconfig.c +++ b/src/util/xmlconfig.c @@ -157,6 +157,7 @@ driParseOptionInfo(driOptionCache *info, assert(!optinfo->name); /* No duplicate options in your list. */ optinfo->type = opt->info.type; + optinfo->range = opt->info.range; XSTRDUP(optinfo->name, name); switch (opt->info.type) { @@ -181,6 +182,7 @@ driParseOptionInfo(driOptionCache *info, unreachable("handled above"); } + /* Built-in default values should always be valid. */ assert(checkValue(optval, optinfo)); } }