]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libuuid: (test) make sure UUID is terminated [coverity scan]
authorKarel Zak <kzak@redhat.com>
Tue, 14 Jul 2020 10:15:47 +0000 (12:15 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jul 2020 10:15:47 +0000 (12:15 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libuuid/src/test_uuid.c

index 495d850001de7d4904ace30c0f8c142cd62ca91e..990791194a065a7c17bbf549deb1871628b2de2f 100644 (file)
@@ -76,8 +76,7 @@ static int check_uuids_in_file(const char *file)
                return 1;
        }
        while ((sz = read(fd, str, sizeof(str))) != 0) {
-               if (isspace(str[sizeof(str) - 1]))
-                       str[sizeof(str) - 1] = '\0';
+               str[sizeof(str) - 1] = '\0';
                if (uuid_parse(str, uuidBits)) {
                        warnx("%s: %s", file, str);
                        ret++;