1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2026-10-22 22:34:26 +00:00

Compare commits

...

4 commits

Author SHA1 Message Date
Ramesh Adhikari
2368e49a82
[regex] fix heap OOB read past pattern buffer in parse_char_class()
* Found via fuzzing the cregex module.
* Fixes a heap out-of-bounds read where the "empty range" check in a character class compared a possibly negative,
  sign-extended char against the next byte, letting the parser advance past the end of the pattern buffer.
* Also rejects a dangling backslash-escape at end-of-pattern the same way an unescaped NUL already is.
* Closes #3033.
2026-08-24 12:54:36 +01:00
Ramesh Adhikari
d3fd56c000
[regex] fix signed-char OOB/UB in char classes and 0-byte alloc on empty pattern
* Found via local libFuzzer harnesses against cregex_parse/compile/vm:
* cregex_char_class_contains()/cregex_char_class_add() (cregex.h) used a
  plain (signed) char sign-extended to int as an array index and shift
  exponent. Any matched byte >= 0x80 produced a negative index into the
  32-byte klass[] array and an undefined-behavior negative shift. This is
  reachable via ImageScanThread()'s cregex_program_run() call, which
  matches an ISO's volume label (attacker-controlled, read from the ISO9660/
  UDF descriptor) against character-class patterns like "^Fedora.*-3[3-9].*".
  Fixed by casting to unsigned char before use.
* estimate_nodes() sized cregex_parse()'s node buffer as strlen(pattern)*2,
  which is 0 for an empty pattern, even though parse_context() always
  pushes at least one node. push()'s only protection was an assert(), which
  is compiled out under NDEBUG. Fixed by reserving at least 1 node.
* Not currently exploitable via any in-tree caller (all cregex_parse() call
  sites use fixed non-empty patterns), but the char-class fix addresses a
  real crash reachable through untrusted ISO volume labels.
* Closes #3022.
2026-08-24 12:52:59 +01:00
lucamosca1
79f178dfa0
[loc] update Italian translation
* Closes #3026.
2026-08-24 12:49:24 +01:00
Frederic Lachapelle
887b5d6112
[wue] restore classic right click context menu
* Also disable auto-installation of manufacturer's questionable apps when plugging new hardware.
* Closes #3007.
2026-08-24 12:38:01 +01:00
6 changed files with 60 additions and 32 deletions

View file

@ -2,8 +2,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 4.14\n" "Project-Id-Version: 4.14\n"
"Report-Msgid-Bugs-To: pete@akeo.ie\n" "Report-Msgid-Bugs-To: pete@akeo.ie\n"
"POT-Creation-Date: 2026-04-18 11:43-0700\n" "POT-Creation-Date: 2026-08-24 12:47+0100\n"
"PO-Revision-Date: 2026-04-18 13:50-0700\n" "PO-Revision-Date: 2026-08-24 12:48+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: it_IT\n" "Language: it_IT\n"
@ -115,7 +115,7 @@ msgstr "Licenza"
#. • IDD_ABOUTBOX → IDOK #. • IDD_ABOUTBOX → IDOK
msgid "OK" msgid "OK"
msgstr "OK" msgstr ""
#. • IDD_LICENSE → IDD_LICENSE #. • IDD_LICENSE → IDD_LICENSE
msgid "Rufus License" msgid "Rufus License"
@ -133,7 +133,7 @@ msgstr "Sì"
#. • IDD_NOTIFICATION → IDNO #. • IDD_NOTIFICATION → IDNO
#. • MSG_009 #. • MSG_009
msgid "No" msgid "No"
msgstr "No" msgstr ""
#. • IDD_LOG → IDD_LOG #. • IDD_LOG → IDD_LOG
msgid "Log" msgid "Log"
@ -286,31 +286,31 @@ msgstr "byte"
#. #.
#. *Short* version of the kilobyte size suffix #. *Short* version of the kilobyte size suffix
msgid "KB" msgid "KB"
msgstr "KB" msgstr ""
#. • MSG_022 #. • MSG_022
#. #.
#. *Short* version of the megabyte size suffix #. *Short* version of the megabyte size suffix
msgid "MB" msgid "MB"
msgstr "MB" msgstr ""
#. • MSG_023 #. • MSG_023
#. #.
#. *Short* version of the gigabyte size suffix #. *Short* version of the gigabyte size suffix
msgid "GB" msgid "GB"
msgstr "GB" msgstr ""
#. • MSG_024 #. • MSG_024
#. #.
#. *Short* version of the terabyte size suffix #. *Short* version of the terabyte size suffix
msgid "TB" msgid "TB"
msgstr "TB" msgstr ""
#. • MSG_025 #. • MSG_025
#. #.
#. *Short* version of the petabyte size suffix #. *Short* version of the petabyte size suffix
msgid "PB" msgid "PB"
msgstr "PB" msgstr ""
#. • MSG_027 #. • MSG_027
msgid "kilobytes" msgid "kilobytes"
@ -792,7 +792,7 @@ msgstr ""
"Questa immagine utilizza Grub %s, ma l'applicazione include solo i file di installazione per Grub %s.\n" "Questa immagine utilizza Grub %s, ma l'applicazione include solo i file di installazione per Grub %s.\n"
"\n" "\n"
"Poiché le diverse versioni di Grub potrebbero non essere compatibili tra loro e non è possibile includerle tutte, Rufus tenterà di individuare una versione del file di installazione di Grub (\"core.img\") che corrisponda a quella presente nella tua immagine:\n" "Poiché le diverse versioni di Grub potrebbero non essere compatibili tra loro e non è possibile includerle tutte, Rufus tenterà di individuare una versione del file di installazione di Grub (\"core.img\") che corrisponda a quella presente nella tua immagine:\n"
"- Seleziona “Sì” per connetterti a Internet e tentare di scaricarlo\n" "- Seleziona “Sì” per connetterti a internet e tentare di scaricarlo\n"
"- Seleziona “No” per utilizzare la versione predefinita di Rufus\n" "- Seleziona “No” per utilizzare la versione predefinita di Rufus\n"
"- Seleziona “Annulla” per interrompere l'operazione\n" "- Seleziona “Annulla” per interrompere l'operazione\n"
"\n" "\n"
@ -808,7 +808,7 @@ msgstr "Installazione Windows standard"
#. http://en.wikipedia.org/wiki/Windows_To_Go in your language. #. http://en.wikipedia.org/wiki/Windows_To_Go in your language.
#. Otherwise, you may add a parenthesis eg. "Windows To Go (<hint at what it does>)" #. Otherwise, you may add a parenthesis eg. "Windows To Go (<hint at what it does>)"
msgid "Windows To Go" msgid "Windows To Go"
msgstr "Windows To Go" msgstr ""
#. • MSG_119 #. • MSG_119
msgid "advanced drive properties" msgid "advanced drive properties"
@ -1955,11 +1955,11 @@ msgid ""
"\n" "\n"
"Note: The files will be downloaded in the application's directory and will be reused automatically if present." "Note: The files will be downloaded in the application's directory and will be reused automatically if present."
msgstr "" msgstr ""
"Rufus ha trovato una verzione aggiornamentato dei fili DBX usati per eseguire la verifica di revoca per UEFI Secure Boot. Vuoi scaricare questo aggiornamento?\n" "Rufus ha trovato una versione aggiornata dei file DBX usati per eseguire la verifica di revoca per UEFI Secure Boot. Vuoi scaricare questo aggiornamento?\n"
"- Seleziona \"Sì\" per connettere all'Internet e scaricare questo contenuto\n" "- Seleziona \"Sì\" per connetterti a internet e scaricare questo contenuto\n"
"- Seleziona \"No\" per cancellare l'operazione\n" "- Seleziona \"No\" per cancellare l'operazione\n"
"\n" "\n"
"Nota: " "Nota: I file saranno scaricati nella directory dell'applicazione e verranno riutilizzati automaticamente se disponibili"
#. • MSG_355 #. • MSG_355
msgid "⚠SILENTLY⚠ erase disk and install:" msgid "⚠SILENTLY⚠ erase disk and install:"
@ -1971,15 +1971,13 @@ msgid ""
"\n" "\n"
"This is an advanced option, reserved for people who want to create media that does not prompt the user during Windows installation and therefore UNCONDITIONALLY ERASES the first detected disk on the target system. If you are not careful, using this option can result in IRREVERSIBLE DATA LOSS!\n" "This is an advanced option, reserved for people who want to create media that does not prompt the user during Windows installation and therefore UNCONDITIONALLY ERASES the first detected disk on the target system. If you are not careful, using this option can result in IRREVERSIBLE DATA LOSS!\n"
"\n" "\n"
"If this is not what you want, please select 'No' to go back and uncheck the option.\n" "You MUST read and accept all of the following propositions to proceed:"
"Otherwise, if you select 'Yes', you agree that the whole responsibility for any data loss will be entirely with YOU."
msgstr "" msgstr ""
"Hai scelto di utilizzare l'opzione di installazione “silenziosa” di Windows.\n" "Hai scelto di utilizzare l'opzione di installazione “silenziosa” di Windows.\n"
"\n" "\n"
"Si tratta di un'opzione avanzata, riservata a chi desidera creare un supporto che non richieda l'intervento dell'utente durante l'installazione di Windows e che, di conseguenza, CANCELLI INCONDIZIONATAMENTE il primo disco rilevato sul sistema di destinazione. Se non presti la dovuta attenzione, l'utilizzo di questa opzione può causare una PERDITA IRREVERSIBILE DI DATI!\n" "Si tratta di un'opzione avanzata, riservata a chi desidera creare un supporto che non richieda l'intervento dell'utente durante l'installazione di Windows e che, di conseguenza, CANCELLI INCONDIZIONATAMENTE il primo disco rilevato sul sistema di destinazione. Se non presti la dovuta attenzione, l'utilizzo di questa opzione può causare una PERDITA IRREVERSIBILE DI DATI!\n"
"\n" "\n"
"Se non è questo ciò che desideri, seleziona “No” per tornare indietro e deselezionare l'opzione.\n" "DEVI leggere e accettare tutte le seguenti dichiarazioni per continuare:"
"Altrimenti, selezionando “Sì”, accetti che l'intera responsabilità per qualsiasi perdita di dati ricada interamente su di TE."
#. • MSG_358 #. • MSG_358
msgid "Unsupported image location" msgid "Unsupported image location"
@ -2001,7 +1999,7 @@ msgstr "È consigliabile lasciare questa opzione attivata anche se si dispone di
#. • MSG_361 #. • MSG_361
msgid "For this option to work, network/Internet MUST be disconnected during installation!" msgid "For this option to work, network/Internet MUST be disconnected during installation!"
msgstr "Affinché questa opzione funzioni, è NECESSARIO disconnettere la rete/Internet durante l'installazione!" msgstr "Affinché questa opzione funzioni, è NECESSARIO disconnettere la rete/internet durante l'installazione!"
#. • MSG_362 #. • MSG_362
msgid "Automatically answer 'no' to the Windows setup questions relating to the sharing of data with Microsoft, instead of prompting the user." msgid "Automatically answer 'no' to the Windows setup questions relating to the sharing of data with Microsoft, instead of prompting the user."
@ -2021,7 +2019,7 @@ msgstr "Duplica le impostazioni regionali di questo PC (tastiera, fuso orario, v
#. • MSG_366 #. • MSG_366
msgid "Don't encrypt the system disk, unless explicitly requested by the user." msgid "Don't encrypt the system disk, unless explicitly requested by the user."
msgstr "Don't encrypt the system disk, unless explicitly requested by the user." msgstr "Non crittografare il disco di sistema, a meno che non sia esplicitamente richiesto dall'utente."
#. • MSG_367 #. • MSG_367
msgid "Use this option only if you know what S-Mode is and understand that your system may be locked into S-Mode even after you completely erase and reinstall Windows." msgid "Use this option only if you know what S-Mode is and understand that your system may be locked into S-Mode even after you completely erase and reinstall Windows."
@ -2043,6 +2041,18 @@ msgstr "Miglioramenti alla “QoL”: disattiva la maggior parte delle funzional
msgid "If you use this option, please make sure to disconnect every disk from the target PC, except the one you want to install Windows on, as well as not leave the media plugged into any PC you don't want to erase." msgid "If you use this option, please make sure to disconnect every disk from the target PC, except the one you want to install Windows on, as well as not leave the media plugged into any PC you don't want to erase."
msgstr "Se si utilizza questa opzione, assicurarsi di scollegare tutti i dischi dal PC di destinazione, tranne quello su cui si desidera installare Windows, e di non lasciare il supporto collegato a nessun PC che non si desidera cancellare." msgstr "Se si utilizza questa opzione, assicurarsi di scollegare tutti i dischi dal PC di destinazione, tranne quello su cui si desidera installare Windows, e di non lasciare il supporto collegato a nessun PC che non si desidera cancellare."
#. • MSG_372
msgid "I WILL ensure that all disks, except the one I want to install Windows on, are disconnected."
msgstr "MI ASSICURERÒ che tutti i dischi, tranne quello per Windows, siano scollegati."
#. • MSG_373
msgid "I WILL ensure that I don't leave this media plugged on a PC I do not plan to erase."
msgstr "MI ASSICURERÒ di non lasciare questo supporto collegato a un PC che non intendo cancellare."
#. • MSG_374
msgid "I AGREE that any data loss resulting from the use of this option lies entirely with me."
msgstr "ACCETTO che qualsiasi perdita di dati derivante da questa opzione sia a mio esclusivo carico."
#. • MSG_900 #. • MSG_900
#. #.
#. The following messages are for the Windows Store listing only and are not used by the application #. The following messages are for the Windows Store listing only and are not used by the application

View file

@ -7521,7 +7521,7 @@ t MSG_112 "La formattazione di un volume UDF di grandi dimensioni può richieder
t MSG_113 "Volume UDF di grandi dimensioni" t MSG_113 "Volume UDF di grandi dimensioni"
t MSG_114 "Questa immagine usa Syslinux %s%s ma questa applicazione include solo i file di installazione per Syslinux %s%s.\n\nPoiché le nuove versioni di Syslinux non sono compatibili con le precedenti e non sarebbe possibile per Rufus includerle tutte, devono essere scaricati da internet due file aggiuntivi ('ldlinux.sys' e 'ldlinux.bss'):\n- Seleziona 'Sì' per collegarti a internet e scaricare questi due file\n- Seleziona 'No' per annullare l'operazione\nNota: i file verranno scaricati nella cartella attuale dell'applicazione e verranno riusati automaticamente se presenti." t MSG_114 "Questa immagine usa Syslinux %s%s ma questa applicazione include solo i file di installazione per Syslinux %s%s.\n\nPoiché le nuove versioni di Syslinux non sono compatibili con le precedenti e non sarebbe possibile per Rufus includerle tutte, devono essere scaricati da internet due file aggiuntivi ('ldlinux.sys' e 'ldlinux.bss'):\n- Seleziona 'Sì' per collegarti a internet e scaricare questi due file\n- Seleziona 'No' per annullare l'operazione\nNota: i file verranno scaricati nella cartella attuale dell'applicazione e verranno riusati automaticamente se presenti."
t MSG_115 "Richiede download" t MSG_115 "Richiede download"
t MSG_116 "Questa immagine utilizza Grub %s, ma l'applicazione include solo i file di installazione per Grub %s.\n\nPoiché le diverse versioni di Grub potrebbero non essere compatibili tra loro e non è possibile includerle tutte, Rufus tenterà di individuare una versione del file di installazione di Grub (\"core.img\") che corrisponda a quella presente nella tua immagine:\n- Seleziona “Sì” per connetterti a Internet e tentare di scaricarlo\n- Seleziona “No” per utilizzare la versione predefinita di Rufus\n- Seleziona “Annulla” per interrompere l'operazione\n\nNota: il file verrà scaricato nella directory corrente dell'applicazione e verrà riutilizzato automaticamente se presente. Se online non viene trovata alcuna corrispondenza, verrà utilizzata la versione predefinita." t MSG_116 "Questa immagine utilizza Grub %s, ma l'applicazione include solo i file di installazione per Grub %s.\n\nPoiché le diverse versioni di Grub potrebbero non essere compatibili tra loro e non è possibile includerle tutte, Rufus tenterà di individuare una versione del file di installazione di Grub (\"core.img\") che corrisponda a quella presente nella tua immagine:\n- Seleziona “Sì” per connetterti a internet e tentare di scaricarlo\n- Seleziona “No” per utilizzare la versione predefinita di Rufus\n- Seleziona “Annulla” per interrompere l'operazione\n\nNota: il file verrà scaricato nella directory corrente dell'applicazione e verrà riutilizzato automaticamente se presente. Se online non viene trovata alcuna corrispondenza, verrà utilizzata la versione predefinita."
t MSG_117 "Installazione Windows standard" t MSG_117 "Installazione Windows standard"
t MSG_119 "opzioni avanzate unità" t MSG_119 "opzioni avanzate unità"
t MSG_120 "opzioni avanzate formattazione" t MSG_120 "opzioni avanzate formattazione"
@ -7755,17 +7755,18 @@ t MSG_350 "Utilizza bootloader firmati 'Windows CA 2023' (Richiede PC compatibil
t MSG_351 "Verifica della revoca del bootloader UEFI..." t MSG_351 "Verifica della revoca del bootloader UEFI..."
t MSG_352 "Verifica degli aggiornamenti UEFI DBX..." t MSG_352 "Verifica degli aggiornamenti UEFI DBX..."
t MSG_353 "Aggiornamento DBX disponibile" t MSG_353 "Aggiornamento DBX disponibile"
t MSG_354 "Rufus ha trovato una verzione aggiornamentato dei fili DBX usati per eseguire la verifica di revoca per UEFI Secure Boot. Vuoi scaricare questo aggiornamento?\n- Seleziona \"Sì\" per connettere all'Internet e scaricare questo contenuto\n- Seleziona \"No\" per cancellare l'operazione\n\nNota: " t MSG_354 "Rufus ha trovato una versione aggiornata dei file DBX usati per eseguire la verifica di revoca per UEFI Secure Boot. Vuoi scaricare questo aggiornamento?\n- Seleziona \"Sì\" per connetterti a internet e scaricare questo contenuto\n- Seleziona \"No\" per cancellare l'operazione\n\nNota: I file saranno scaricati nella directory dell'applicazione e verranno riutilizzati automaticamente se disponibili"
t MSG_355 "Cancella disco e installa ⚠SILENZIOSA⚠:" t MSG_355 "Cancella disco e installa ⚠SILENZIOSA⚠:"
t MSG_356 "Hai scelto di utilizzare l'opzione di installazione “silenziosa” di Windows.\n\nSi tratta di un'opzione avanzata, riservata a chi desidera creare un supporto che non richieda l'intervento dell'utente durante l'installazione di Windows e che, di conseguenza, CANCELLI INCONDIZIONATAMENTE il primo disco rilevato sul sistema di destinazione. Se non presti la dovuta attenzione, l'utilizzo di questa opzione può causare una PERDITA IRREVERSIBILE DI DATI!\n\nDEVI leggere e accettare tutte le seguenti dichiarazioni per continuare:" t MSG_356 "Hai scelto di utilizzare l'opzione di installazione “silenziosa” di Windows.\n\nSi tratta di un'opzione avanzata, riservata a chi desidera creare un supporto che non richieda l'intervento dell'utente durante l'installazione di Windows e che, di conseguenza, CANCELLI INCONDIZIONATAMENTE il primo disco rilevato sul sistema di destinazione. Se non presti la dovuta attenzione, l'utilizzo di questa opzione può causare una PERDITA IRREVERSIBILE DI DATI!\n\nDEVI leggere e accettare tutte le seguenti dichiarazioni per continuare:"
t MSG_358 "Percorso immagine non sopportato." t MSG_358 "Percorso immagine non sopportato."
t MSG_359 "Non puoi usare un'immagine che si trova nell'unità di destinazione, poiché tale unità verrà completamente formattata. È come cercare di segare il ramo su cui sei seduto!\n\nSposta l'immagine in una posizione diversa e riprova." t MSG_359 "Non puoi usare un'immagine che si trova nell'unità di destinazione, poiché tale unità verrà completamente formattata. È come cercare di segare il ramo su cui sei seduto!\n\nSposta l'immagine in una posizione diversa e riprova."
t MSG_360 "È consigliabile lasciare questa opzione attivata anche se si dispone di un TPM o di più RAM, poiché essa si limita a ignorare i requisiti di configurazione e non impedisce effettivamente a Windows di utilizzare tutto l'hardware disponibile." t MSG_360 "È consigliabile lasciare questa opzione attivata anche se si dispone di un TPM o di più RAM, poiché essa si limita a ignorare i requisiti di configurazione e non impedisce effettivamente a Windows di utilizzare tutto l'hardware disponibile."
t MSG_361 "Affinché questa opzione funzioni, è NECESSARIO disconnettere la rete/Internet durante l'installazione!" t MSG_361 "Affinché questa opzione funzioni, è NECESSARIO disconnettere la rete/internet durante l'installazione!"
t MSG_362 "Rispondere automaticamente “no” alle domande della procedura di installazione di Windows relative alla condivisione dei dati con Microsoft, invece di chiedere conferma all'utente." t MSG_362 "Rispondere automaticamente “no” alle domande della procedura di installazione di Windows relative alla condivisione dei dati con Microsoft, invece di chiedere conferma all'utente."
t MSG_363 "Ti consigliamo di lasciare questa opzione abilitata, a meno che tu non abbia nulla in contrario al fatto che \"Windows To Go\" acceda ai dischi interni ed esegua in modo silenzioso aggiornamenti irreversibili del file system." t MSG_363 "Ti consigliamo di lasciare questa opzione abilitata, a meno che tu non abbia nulla in contrario al fatto che \"Windows To Go\" acceda ai dischi interni ed esegua in modo silenzioso aggiornamenti irreversibili del file system."
t MSG_364 "Crea automaticamente un account locale con il nome utente specificato, utilizzando una password vuota che dovrà essere modificata al prossimo accesso." t MSG_364 "Crea automaticamente un account locale con il nome utente specificato, utilizzando una password vuota che dovrà essere modificata al prossimo accesso."
t MSG_365 "Duplica le impostazioni regionali di questo PC (tastiera, fuso orario, valuta), invece di chiedere conferma all'utente." t MSG_365 "Duplica le impostazioni regionali di questo PC (tastiera, fuso orario, valuta), invece di chiedere conferma all'utente."
t MSG_366 "Non crittografare il disco di sistema, a meno che non sia esplicitamente richiesto dall'utente."
t MSG_367 "Utilizza questa opzione solo se sai cos'è la modalità S e sei consapevole del fatto che il tuo sistema potrebbe rimanere bloccato in modalità S anche dopo aver cancellato completamente e reinstallato Windows." t MSG_367 "Utilizza questa opzione solo se sai cos'è la modalità S e sei consapevole del fatto che il tuo sistema potrebbe rimanere bloccato in modalità S anche dopo aver cancellato completamente e reinstallato Windows."
t MSG_368 "Utilizza questa opzione se il sistema su cui intendi installare Windows utilizza certificati Secure Boot completamente aggiornati. Se necessario, puoi valutare l'utilizzo di \"Mosby\" per aggiornare il tuo sistema." t MSG_368 "Utilizza questa opzione se il sistema su cui intendi installare Windows utilizza certificati Secure Boot completamente aggiornati. Se necessario, puoi valutare l'utilizzo di \"Mosby\" per aggiornare il tuo sistema."
t MSG_369 "Utilizza questa opzione se desideri revocare ulteriori bootloader di Windows potenzialmente non sicuri, tenendo presente che ciò potrebbe impedire l'avvio anche dei supporti standard di Windows." t MSG_369 "Utilizza questa opzione se desideri revocare ulteriori bootloader di Windows potenzialmente non sicuri, tenendo presente che ciò potrebbe impedire l'avvio anche dei supporti standard di Windows."

View file

@ -77,12 +77,17 @@ typedef char cregex_char_class[(UCHAR_MAX + CHAR_BIT - 1) / CHAR_BIT];
static inline int cregex_char_class_contains(const cregex_char_class klass, static inline int cregex_char_class_contains(const cregex_char_class klass,
int ch) int ch)
{ {
return klass[ch / CHAR_BIT] & (1 << ch % CHAR_BIT); /* ch is derived from a plain (signed on most platforms) char, so bytes
* >= 0x80 sign-extend to a negative int. Cast to unsigned char first or
* this indexes klass[] out of bounds and shifts by a negative amount. */
unsigned char uch = (unsigned char)ch;
return klass[uch / CHAR_BIT] & (1 << uch % CHAR_BIT);
} }
static inline int cregex_char_class_add(cregex_char_class klass, int ch) static inline int cregex_char_class_add(cregex_char_class klass, int ch)
{ {
klass[ch / CHAR_BIT] |= 1 << (ch % CHAR_BIT); unsigned char uch = (unsigned char)ch;
klass[uch / CHAR_BIT] |= 1 << (uch % CHAR_BIT);
return ch; return ch;
} }

View file

@ -72,11 +72,13 @@ static cregex_node_t *parse_char_class(regex_parse_context *context)
.type = type, .from = from, .to = context->sp - 1}); .type = type, .from = from, .to = context->sp - 1});
case '\\': case '\\':
ch = *context->sp++; ch = *context->sp++;
if (ch == '\0')
return NULL;
/* fall-through */ /* fall-through */
default: default:
CHARACTER: CHARACTER:
if (*context->sp == '-' && context->sp[1] != ']') { if (*context->sp == '-' && context->sp[1] != ']') {
if (context->sp[1] < ch) if ((unsigned char)context->sp[1] < (unsigned char)ch)
/* empty range in character class */ /* empty range in character class */
return NULL; return NULL;
context->sp += 2; context->sp += 2;
@ -247,7 +249,10 @@ static cregex_node_t *parse_context(regex_parse_context *context, int depth)
static inline int estimate_nodes(const char *pattern) static inline int estimate_nodes(const char *pattern)
{ {
return (int)strlen(pattern) * 2; /* +1 so that an empty pattern ("") still gets a non-zero allocation:
* parse_context() always pushes at least one (EPSILON) node via
* concatenate(), even when nothing was parsed. */
return (int)strlen(pattern) * 2 + 1;
} }
/* Parse a pattern (using a previously allocated buffer of at least /* Parse a pattern (using a previously allocated buffer of at least

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326 IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 4.15.2396" CAPTION "Rufus 4.15.2400"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0 FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -409,8 +409,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,15,2396,0 FILEVERSION 4,15,2400,0
PRODUCTVERSION 4,15,2396,0 PRODUCTVERSION 4,15,2400,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -428,13 +428,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie" VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting" VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "4.15.2396" VALUE "FileVersion", "4.15.2400"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2026 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2026 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-4.15.exe" VALUE "OriginalFilename", "rufus-4.15.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "4.15.2396" VALUE "ProductVersion", "4.15.2400"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -417,6 +417,9 @@ char* CreateUnattendXml(int arch, int flags)
"/v SystemPaneSuggestionsEnabled /t REG_DWORD /d 0 /f", TRUE); "/v SystemPaneSuggestionsEnabled /t REG_DWORD /d 0 /f", TRUE);
StrArrayAdd(&commands, "reg add \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Search\" " StrArrayAdd(&commands, "reg add \"HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Search\" "
"/v BingSearchEnabled /t REG_DWORD /d 0 /f", TRUE); "/v BingSearchEnabled /t REG_DWORD /d 0 /f", TRUE);
// Disable auto installation of manufacturer's crappy apps when plugging new hardware
StrArrayAdd(&commands, "reg add \"HKLM\\Software\\Policies\\Microsoft\\Windows\\Device Metadata\" "
"/v PreventDeviceMetadataFromNetwork /t REG_DWORD /d 1 /f", TRUE);
// Disable News // Disable News
StrArrayAdd(&commands, "reg add \"HKLM\\Software\\Policies\\Microsoft\\Dsh\" " StrArrayAdd(&commands, "reg add \"HKLM\\Software\\Policies\\Microsoft\\Dsh\" "
"/v AllowNewsAndInterests /t REG_DWORD /d 0 /f", TRUE); "/v AllowNewsAndInterests /t REG_DWORD /d 0 /f", TRUE);
@ -444,6 +447,10 @@ char* CreateUnattendXml(int arch, int flags)
"\"Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Start' " "\"Set-ItemProperty -Path 'Registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Start' "
"-Name 'VisiblePlaces' -Value $([convert]::FromBase64String('ztU0LVr6Q0WC8iLm6vd3PC+zZ+PeiVVDv85h83sYqTe8JIo" "-Name 'VisiblePlaces' -Value $([convert]::FromBase64String('ztU0LVr6Q0WC8iLm6vd3PC+zZ+PeiVVDv85h83sYqTe8JIo"
"UDNaJQqCAbtm7okiCRIF1/g0IrkKL2jTtl7ZjlEqwvXRK+WhPi9ZDmAcdqLyGCHNSqlFDQp97J3ZYRlnU')) -Type 'Binary'\"", TRUE); "UDNaJQqCAbtm7okiCRIF1/g0IrkKL2jTtl7ZjlEqwvXRK+WhPi9ZDmAcdqLyGCHNSqlFDQp97J3ZYRlnU')) -Type 'Binary'\"", TRUE);
// Restore the classic right click context menu
uprintf("• QoL: Restore classic context menu");
StrArrayAdd(&commands, "reg add \"HKCU\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\\InprocServer32\" "
"/ve /t REG_SZ /d \"\" /f", TRUE);
} }
// Now that we have all the commands to run, create the FirstLogonCommands section. // Now that we have all the commands to run, create the FirstLogonCommands section.
for (order = 1; order <= (int)commands.Index; order++) { for (order = 1; order <= (int)commands.Index; order++) {