Re: [PATCH v2 08/31] gpu: nova-core: add optional ucodes firmware loading
From: M Henning
Date: Sun Aug 23 2026 - 12:26:46 EST
On Fri, Aug 21, 2026 at 9:58 PM John Hubbard <jhubbard@xxxxxxxxxx> wrote:
> + // FILE is a basename relative to the TLV's directory, not an arbitrary firmware path.
> + if file.is_empty() || matches!(file, "." | "..") || file.contains('/') {
> + return Err(EINVAL);
> + }
This isn't a sane way to check if a path includes a directory
component or not. You really want to use path-handling apis, rather
than open-coding this in a way that rejects a few special cases.