exfat: limit backup volume name to 11 characters

This commit is contained in:
John Scipione 2014-02-04 20:33:13 -05:00
parent aeb03a8f68
commit c79381d32a
1 changed files with 2 additions and 2 deletions

View File

@ -377,8 +377,8 @@ Volume::Mount(const char* deviceName, uint32 flags)
double size = double((10 * diskSize + divisor - 1) / divisor); double size = double((10 * diskSize + divisor - 1) / divisor);
// %g in the kernel does not support precision... // %g in the kernel does not support precision...
snprintf(fName, sizeof(fName), "%g %cB ExFAT Volume", snprintf(fName, 11 + 1, "%g %cB ExFAT", size / 10, unit);
size / 10, unit); // exfat volume names can only contain 11 characters
} }
return B_OK; return B_OK;