mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-29 14:05:22 -04:00
[net] improve handling of invalid signatures
* Also make bPromptOnError an actual parameter to the download function calls * Also prefer the use of assert() to custom assertion messages
This commit is contained in:
parent
fdfc9ff82d
commit
7c142fadbc
12 changed files with 93 additions and 78 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "rufus.h"
|
||||
#include "missing.h"
|
||||
|
@ -109,11 +110,9 @@ BOOL GetAutoMount(BOOL* enabled)
|
|||
* clear the MBR of!), so we mitigate the risk by forcing our indexes to belong to
|
||||
* the specific range [DRIVE_INDEX_MIN; DRIVE_INDEX_MAX].
|
||||
*/
|
||||
#define CheckDriveIndex(DriveIndex) do { \
|
||||
if ((DriveIndex < DRIVE_INDEX_MIN) || (DriveIndex > DRIVE_INDEX_MAX)) { \
|
||||
uprintf("ERROR: Bad index value %d. Please check the code!", DriveIndex); \
|
||||
goto out; \
|
||||
} \
|
||||
#define CheckDriveIndex(DriveIndex) do { \
|
||||
assert((DriveIndex >= DRIVE_INDEX_MIN) && (DriveIndex <= DRIVE_INDEX_MAX)); \
|
||||
if ((DriveIndex < DRIVE_INDEX_MIN) || (DriveIndex > DRIVE_INDEX_MAX)) goto out; \
|
||||
DriveIndex -= DRIVE_INDEX_MIN; } while (0)
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue