]> code.ossystems Code Review - openembedded-core.git/commitdiff
makedevs: fix invalidScanfFormatWidth to prevent overflowing usr_buf
authorFrazer Leslie Clews <frazer.clews@codethink.co.uk>
Mon, 28 Oct 2019 17:14:49 +0000 (17:14 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 31 Oct 2019 16:07:11 +0000 (16:07 +0000)
Signed-off-by: Frazer Leslie Clews <frazer.clews@codethink.co.uk>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/makedevs/makedevs/makedevs.c

index 01e564afee932909d989dfdab965cda80797e636..32b9872932bb5b7e763292ea140ae64ba04d970a 100644 (file)
@@ -360,7 +360,7 @@ static int interpret_table_entry(char *line)
        unsigned long mode = 0755, uid = 0, gid = 0, major = 0, minor = 0;
        unsigned long start = 0, increment = 1, count = 0;
 
-       if (0 > sscanf(line, "%4095s %c %lo %40s %40s %lu %lu %lu %lu %lu", path,
+       if (0 > sscanf(line, "%4095s %c %lo %39s %39s %lu %lu %lu %lu %lu", path,
                    &type, &mode, usr_buf, grp_buf, &major, &minor, &start,
                    &increment, &count))
        {