reg: Fail if the data for REG_MULTI_SZ contains two adjacent separators.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-02-29 15:54:21 +11:00 committed by Alexandre Julliard
parent 5441f8352c
commit afa5251b10
50 changed files with 234 additions and 3 deletions

View File

@ -11880,6 +11880,10 @@ msgstr "هل أنت متأكد من رغبتك في حذف القيمة '%s' ؟"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "هل أنت متأكد من رغبتك في حذف '%1' ؟"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "ال&سجل"

View File

@ -11496,6 +11496,10 @@ msgstr "Наистина ли искате да изтриете стойнос
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Наистина ли искате да изтриете '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Регистър"

View File

@ -11754,6 +11754,15 @@ msgstr "Esteu segur que voleu suprimir el valor '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Esteu segur que voleu suprimir '%1'?"
#: reg.rc:52
#, fuzzy
#| msgid ""
#| "uninstaller: The option '--remove' must be followed by an application "
#| "GUID\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
"desinstal·lador: Una GUID d'aplicació ha de seguir l'opció '--remove'\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registre"

View File

@ -11567,6 +11567,10 @@ msgstr "Opravdu chcete smazat hodnotu „%s“?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Opravdu chcete odstranit „%1“?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registr"

View File

@ -11833,6 +11833,10 @@ msgstr "Er du sikker på at ville slette værdien '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Er du sikker på du vil slette '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Register"

View File

@ -11732,6 +11732,15 @@ msgstr "Möchten Sie den Wert '%s' wirklich löschen?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Sind Sie sicher, dass Sie '%1' löschen möchten?"
#: reg.rc:52
#, fuzzy
#| msgid ""
#| "uninstaller: The option '--remove' must be followed by an application "
#| "GUID\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
"Uninstaller: Auf die Option '--remove' muss eine Anwendungs-GUID folgen\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registrierung"

View File

@ -11282,6 +11282,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11627,6 +11627,10 @@ msgstr "Are you sure you want to delete all registry values in '%1'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Are you sure you want to delete the registry key '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr "reg: The option [/d] must be followed by a valid string\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registry"

View File

@ -11627,6 +11627,10 @@ msgstr "Are you sure you want to delete all registry values in '%1'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Are you sure you want to delete the registry key '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr "reg: The option [/d] must be followed by a valid string\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registry"

View File

@ -11186,6 +11186,10 @@ msgstr "Ĉu vi certas pri forigo de '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Ĉu vi estas certa pri forigo de '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registrejo"

View File

@ -11912,6 +11912,10 @@ msgstr "¿Seguro que desea eliminar el valor '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "¿Seguro que desea eliminar '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registro"

View File

@ -11276,6 +11276,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11606,6 +11606,12 @@ msgstr "Haluatko varmasti tuhota kaikki rekisterin arvot kohteesta '%1'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Haluatko varmasti tuhota rekisteriavaimen '%1'?"
#: reg.rc:52
#, fuzzy
#| msgid "reg: The option [/d] must be followed by a valid integer\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr "reg: Valitsinta [/d] täytyy seurata kelpo kokonaisluku\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Rekisteri"

View File

@ -11766,6 +11766,12 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Voulez-vous réellement supprimer la clé de registre « %1 » ?"
#: reg.rc:52
#, fuzzy
#| msgid "reg: The option [/d] must be followed by a valid integer\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr "reg : l'option [/d] doit être suivie d'un entier valide\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registre"

View File

@ -11657,6 +11657,10 @@ msgstr "האם ברצונך למחוק את הערך '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "האם אכן ברצונך למחוק את '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&רישום המערכת"

View File

@ -11083,6 +11083,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11390,6 +11390,10 @@ msgstr "Sigurno želite izbrisati '%1'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Sigurno želite izbrisati '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registar"

View File

@ -11827,6 +11827,10 @@ msgstr "Biztos hogy törölni szeretné a(z) '%s' kulcsot?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Biztos hogy törölni szeretné ezt: '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Fájl"

View File

@ -11913,6 +11913,10 @@ msgstr "Sei sicuro di volere eliminare il valore '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Sei sicuro di voler cancellare '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registro"

View File

@ -11611,6 +11611,12 @@ msgstr "本当に '%1' にあるすべてのレジストリ値を削除します
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "本当にレジストリ キー '%1' を削除しますか?"
#: reg.rc:52
#, fuzzy
#| msgid "reg: The option [/d] must be followed by a valid integer\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr "reg: /d オプションのあとに正しい整数値を指定してください\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "レジストリ(&R)"

View File

@ -11902,6 +11902,10 @@ msgstr "당신은 이 값 '%s'을 정말로 지우겠습니까?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "당신은 '%1'을 지우기를 바랍니까?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "레지스트리(&R)"

View File

@ -11634,6 +11634,12 @@ msgstr "Ar tikrai norite pašalinti visas registro „%1“ reikšmes?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Ar tikrai norite pašalinti registro raktą „%1“?"
#: reg.rc:52
#, fuzzy
#| msgid "reg: The option [/d] must be followed by a valid integer\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr "reg: Už parametro [/d] privalo būti tinkamas sveikasis skaičius\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "R&egistras"

View File

@ -11083,6 +11083,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11738,6 +11738,10 @@ msgstr "Virkelig slette verdien «%s»?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Vil du virkelig slette «%1»?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Register"

View File

@ -11879,6 +11879,10 @@ msgstr "Weet u zeker dat u de waarde '%s' wilt verwijderen?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Weet u zeker dat u '%1' wilt verwijderen?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registerbestand"

View File

@ -11083,6 +11083,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11083,6 +11083,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11711,6 +11711,14 @@ msgstr "Jesteś pewien, że chcesz usunąć daną '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Czy jesteś pewien, że chcesz usunąć '%1'?"
#: reg.rc:52
#, fuzzy
#| msgid ""
#| "uninstaller: The option '--remove' must be followed by an application "
#| "GUID\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr "usuwanie programów: Po opcji '--remove' należy podać GUID aplikacji\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Rejestr"

View File

@ -11722,6 +11722,10 @@ msgstr "Tem certeza que deseja excluir o valor '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Você tem certeza que deseja excluir '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registro"

View File

@ -11704,6 +11704,10 @@ msgstr "Tem certeza que deseja excluir o valor '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Tem certeza que deseja excluir '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registo"

View File

@ -11161,6 +11161,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11923,6 +11923,10 @@ msgstr "Sigur doriți să ștergeți valoarea „%s”?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Sunteți sigur că vreți să ștergeți '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registru"

View File

@ -11630,6 +11630,12 @@ msgstr "Вы точно хотите удалить все параметры р
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Вы точно хотите удалить ключ реестра «%1»?"
#: reg.rc:52
#, fuzzy
#| msgid "reg: The option [/d] must be followed by a valid integer\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr "reg: за опцией [/d] должно следовать целое число\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Реестр"

View File

@ -11355,6 +11355,10 @@ msgstr "Ste si istý že chcete zmazať túto hodnotu '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Ste si istý že chcete zmazať tieto hodnoty?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Registry"

View File

@ -11856,6 +11856,10 @@ msgstr "Ali ste prepričani, da želite izbrisati vrednost '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Ali ste prepričani, da želite izbrisati predmet '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Register"

View File

@ -11748,6 +11748,10 @@ msgstr "Желите ли да избришете „%1“?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Желите ли да избришете „%1“?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11887,6 +11887,10 @@ msgstr "Želite li da izbrišete „%1“?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Želite li da izbrišete „%1“?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11554,6 +11554,10 @@ msgstr "Vill du verkligen ta bort värdet '%s'?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Är du säker du vill ta bort '%1'?"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "&Register"

View File

@ -11083,6 +11083,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11314,6 +11314,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11679,6 +11679,15 @@ msgstr "'%s' değerini silmek istediğinizden emin misiniz?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "'%1' öğesini silmek istediğinizden emin misiniz?"
#: reg.rc:52
#, fuzzy
#| msgid ""
#| "uninstaller: The option '--remove' must be followed by an application "
#| "GUID\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
"uninstaller: --remove seçeneğinden sonra bir uygulama GUID'i girilmelidir\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Kayıt"

View File

@ -11741,6 +11741,15 @@ msgstr "Ви впевнені, що хочете видалити значенн
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "Ви впевнені, що хочете вилучити '%1'?"
#: reg.rc:52
#, fuzzy
#| msgid ""
#| "uninstaller: The option '--remove' must be followed by an application "
#| "GUID\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
"uninstaller: Для параметра '--remove' повинен бути вказаний GUID застосунка\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "&Реєстр"

View File

@ -11222,6 +11222,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11019,6 +11019,10 @@ msgstr ""
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr ""
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr ""

View File

@ -11183,6 +11183,14 @@ msgstr "您确认要删除值 '%s' 吗?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "真的删除 '%1'?"
#: reg.rc:52
#, fuzzy
#| msgid ""
#| "uninstaller: The option '--remove' must be followed by an application "
#| "GUID\n"
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr "uninstaller: 选项 '--remove' 必须后接一个应用程序 GUID\n"
#: regedit.rc:34
msgid "&Registry"
msgstr "注册表(&R)"

View File

@ -11787,6 +11787,10 @@ msgstr "您確認要刪除這個數值 %s 嗎?"
msgid "Are you sure you want to delete the registry key '%1'?"
msgstr "確定要刪除 %1"
#: reg.rc:52
msgid "reg: The option [/d] must be followed by a valid string\n"
msgstr ""
#: regedit.rc:34
msgid "&Registry"
msgstr "註冊表(&R)"

View File

@ -299,6 +299,13 @@ static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD *r
buffer[destindex] = 0;
else
buffer[destindex] = data[i];
if (destindex && !buffer[destindex - 1] && !buffer[destindex])
{
HeapFree(GetProcessHeap(), 0, buffer);
output_message(STRING_INVALID_STRING);
return NULL;
}
}
buffer[destindex] = 0;
if (destindex && buffer[destindex - 1])

View File

@ -43,3 +43,4 @@
#define STRING_DELETE_VALUE 120
#define STRING_DELETE_VALUEALL 121
#define STRING_DELETE_SUBKEY 122
#define STRING_INVALID_STRING 123

View File

@ -48,4 +48,5 @@ STRINGTABLE
STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?"
STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?"
STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?"
STRING_INVALID_STRING, "reg: The option [/d] must be followed by a valid string\n"
}

View File

@ -353,9 +353,9 @@ static void test_add(void)
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi7 /s \"\" /d \"three#little#strings\" /f", &r);
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi8 /s \"#\" /d \"##\" /f", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi9 /s \"#\" /d \"two##strings\" /f", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi10 /s \"#\" /d \"#a\" /f", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u\n", r);
@ -378,7 +378,7 @@ static void test_add(void)
verify_reg(hkey, "multi15", REG_MULTI_SZ, buffer, 3, 0);
run_reg_exe("reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi16 /d \"two\\0\\0strings\" /f", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r);
ok(r == REG_EXIT_FAILURE, "got exit code %u, expected 1\n", r);
run_reg_exe("reg add HKCU\\" KEY_BASE " /v multi17 /t REG_MULTI_SZ /s \"#\" /d \"#\" /f", &r);
ok(r == REG_EXIT_SUCCESS, "got exit code %u, expected 0\n", r);