]> err.no Git - util-linux/commitdiff
blkid: fix ..._strncpy_uuid
authorKarel Zak <kzak@redhat.com>
Fri, 23 Jan 2009 21:55:37 +0000 (22:55 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Feb 2009 22:35:24 +0000 (23:35 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libs/blkid/src/probe.c
tests/expected/blkid/low-probe-ddf-raid

index 31f3df19ee232922d4cc94208301937dbe866f65..c9f88b058f013e8d6b5877859305d0d73ba1c3cd 100644 (file)
@@ -763,7 +763,7 @@ int blkid_probe_strncpy_uuid(blkid_probe pr, unsigned char *str, size_t len)
        v = blkid_probe_assign_value(pr, "UUID");
        if (v) {
                memcpy((char *) v->data, str, len);
-               v->data[len - 1] = '\0';
+               *(v->data + len) = '\0';
                v->len = len;
                return 0;
        }
index ea770de42d77deaaad64e17270f092487b533cb7..08329501353fffade05fe72ff1c593c40bcf0895 100644 (file)
@@ -1,5 +1,5 @@
 ID_FS_TYPE=ddf_raid_member
 ID_FS_USAGE=raid
-ID_FS_UUID=8Z_I__B_8Z_I_e_I_q_I___
-ID_FS_UUID_ENC=8Z\xb0I\x95\x10B\x028Z\xb0I\xc8e\xb0I\xb8q\xb0I\xff\xff\xff
+ID_FS_UUID=8Z_I__B_8Z_I_e_I_q_I____
+ID_FS_UUID_ENC=8Z\xb0I\x95\x10B\x028Z\xb0I\xc8e\xb0I\xb8q\xb0I\xff\xff\xff\xff
 ID_FS_VERSION=02.00.00