Date: Mon, 18 Feb 2019 08:26:18 +0000 (UTC) From: Toomas Soome <tsoome@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344248 - head/stand/libsa Message-ID: <201902180826.x1I8QI0K040683@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tsoome Date: Mon Feb 18 08:26:18 2019 New Revision: 344248 URL: https://svnweb.freebsd.org/changeset/base/344248 Log: cd9660: dirmatch fails to unmatch when name is prefix for directory record Loader does fail to properly match the file name in directory record and does open file based on prefix match. For fix, we check the name lengths first. Reviewed by: allanjude MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19213 Modified: head/stand/libsa/cd9660.c Modified: head/stand/libsa/cd9660.c ============================================================================== --- head/stand/libsa/cd9660.c Mon Feb 18 04:44:52 2019 (r344247) +++ head/stand/libsa/cd9660.c Mon Feb 18 08:26:18 2019 (r344248) @@ -241,6 +241,10 @@ dirmatch(struct open_file *f, const char *path, struct icase = 1; } else icase = 0; + + if (strlen(path) != len) + return (0); + for (i = len; --i >= 0; path++, cp++) { if (!*path || *path == '/') break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902180826.x1I8QI0K040683>