--- a/sys/vfs/hammer2/hammer2_vfsops.c +++ b/sys/vfs/hammer2/hammer2_vfsops.c @@ -1017,7 +1031,12 @@ else *label = '\0'; /* clean up trailing @ */ - slice = label[-1]; + /* DF-2622: do not read below devstr[] when the device + * string is empty or a bare '@' (label == devstr). */ + if (label > devstr) + slice = label[-1]; + else + slice = 0; switch(slice) { case 'a': label = "BOOT";