mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-22 02:45:11 -04:00
[misc] fix coverity warnings
This commit is contained in:
parent
d7e977e1f1
commit
5170706695
4 changed files with 24 additions and 11 deletions
|
@ -227,8 +227,9 @@ BOOL GetOpticalMedia(IMG_SAVE* img_save)
|
|||
buffer = malloc(2048);
|
||||
if ((buffer != NULL) && (SetFilePointerEx(hDrive, li, NULL, FILE_BEGIN)) &&
|
||||
ReadFile(hDrive, buffer, 2048, &size, NULL) && (size == 2048)) {
|
||||
safe_strcpy(label, sizeof(label), (char*)&buffer[0x28]);
|
||||
for (k = safe_strlen(label) - 1; (k >= 0) && (label[k] == 0x20); k--)
|
||||
memcpy(label, &buffer[0x28], sizeof(label) - 1);
|
||||
label[sizeof(label) - 1] = 0;
|
||||
for (k = strlen(label) - 1; (k >= 0) && (label[k] == 0x20); k--)
|
||||
label[k] = 0;
|
||||
img_save->Label = label;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue