mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-28 21:54:15 -04:00
[misc] harden usage of uprintf()
* Passing a non-formatting buffer as first parameter of uprintf() can lead to an exception if this buffer happens to contain a '%' character, so usage of uprintf() with string buffers that may contain '%' should be sanitized. * Also drop the _uprintf/_uprintfs aliases as they are no longer required.
This commit is contained in:
parent
1a3a155e8c
commit
fffd4d1160
12 changed files with 37 additions and 31 deletions
|
@ -1290,7 +1290,7 @@ static BOOL WriteDrive(HANDLE hPhysicalDrive, BOOL bZeroDrive)
|
|||
}
|
||||
assert((uintptr_t)sec_buf % SelectedDrive.SectorSize == 0);
|
||||
sec_buf_pos = 0;
|
||||
bled_init(_uprintf, NULL, sector_write, update_progress, NULL, &FormatStatus);
|
||||
bled_init(uprintf, NULL, sector_write, update_progress, NULL, &FormatStatus);
|
||||
bled_ret = bled_uncompress_with_handles(hSourceImage, hPhysicalDrive, img_report.compression_type);
|
||||
bled_exit();
|
||||
uprintfs("\r\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue