https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4651faeaa2030cb60314d…
commit 4651faeaa2030cb60314d50866f63e83cf8375fe
Author: Julio Carchi <juliocarchi(a)yahoo.com>
AuthorDate: Wed Sep 20 13:57:04 2023 -0500
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Sep 20 18:57:04 2023 +0000
[BOOTDATA] Add TEMP folder to livecd image (#5683)
Create the folder TEMP in X:\reactos so now we can match current livecd
environment variables TMP and TEMP
can be seen as a part of solving CORE-13041
The use-case for that is:
copying the livecd folder structure directly to writable media as USB sticks or memory cards,
will work then out-of-the-box without any other change.
---
boot/boot_images.cmake | 3 +++
1 file changed, 3 insertions(+)
diff --git a/boot/boot_images.cmake b/boot/boot_images.cmake
index 877cf28bb4a..ae3e600c05b 100644
--- a/boot/boot_images.cmake
+++ b/boot/boot_images.cmake
@@ -141,6 +141,9 @@ add_custom_target(bootcdregtest
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "${CMAKE_CURRENT_BINARY_DIR}/empty\n")
+# Create TEMP dir
+file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "reactos/TEMP=${CMAKE_CURRENT_BINARY_DIR}/empty\n")
+
# Create user profile directories
add_allusers_profile_dirs(${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "Profiles")
add_user_profile_dirs(${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "Profiles" "Default User")
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=02883d1c163c3e11c95ff…
commit 02883d1c163c3e11c95ffb873f071be384b13bda
Author: Jose Carlos Jesus <zecarlos1957(a)hotmail.com>
AuthorDate: Wed Sep 20 12:06:06 2023 -0400
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Sep 20 18:06:06 2023 +0200
[SDK:RTL] RtlpCallQueryRegistryRoutine(): Correctly set SpareData and SpareLength (#5466)
SpareData and SpareLength need to be calculated correctly, as they are used
later in that function as well.
This allows to not overwrite Source UString when writing to Destination UString.
Fixes the problem described in the following JIRA issue, where services could
not start when installing ReactOS in a very-long-named directory.
CORE-18988
---
sdk/lib/rtl/registry.c | 54 +++++++++++++++++++++++++-------------------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/sdk/lib/rtl/registry.c b/sdk/lib/rtl/registry.c
index 3172213265f..8beeb388ab8 100644
--- a/sdk/lib/rtl/registry.c
+++ b/sdk/lib/rtl/registry.c
@@ -196,36 +196,36 @@ RtlpCallQueryRegistryRoutine(IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
}
else
{
- /* Check if this isn't a direct return */
- if (!(QueryTable->Flags & RTL_QUERY_REGISTRY_DIRECT))
+ /* Check if we have length */
+ if (KeyValueInfo->DataLength)
{
- /* Check if we have length */
- if (KeyValueInfo->DataLength)
- {
- /* Increase the spare data */
- SpareData += KeyValueInfo->DataOffset +
- KeyValueInfo->DataLength;
- }
- else
- {
- /* Otherwise, the spare data only has the name data */
- SpareData += FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name) +
- KeyValueInfo->NameLength;
- }
+ /* Increase the spare data */
+ SpareData += KeyValueInfo->DataOffset +
+ KeyValueInfo->DataLength;
+ }
+ else
+ {
+ /* Otherwise, the spare data only has the name data */
+ SpareData += FIELD_OFFSET(KEY_VALUE_FULL_INFORMATION, Name) +
+ KeyValueInfo->NameLength;
+ }
- /* Align the pointer and get new size of spare data */
- SpareData = (PVOID)(((ULONG_PTR)SpareData + 7) & ~7);
- SpareLength = DataEnd - SpareData;
+ /* Align the pointer and get new size of spare data */
+ SpareData = (PVOID)(((ULONG_PTR)SpareData + 7) & ~7);
+ SpareLength = DataEnd - SpareData;
- /* Check if we have space to copy the data */
- RequiredLength = KeyValueInfo->NameLength + sizeof(UNICODE_NULL);
- if ((SpareData > DataEnd) || (SpareLength < RequiredLength))
- {
- /* Fail and return the missing length */
- *InfoSize = (ULONG)(SpareData - (PCHAR)KeyValueInfo) + RequiredLength;
- return STATUS_BUFFER_TOO_SMALL;
- }
+ /* Check if we have space to copy the data */
+ RequiredLength = KeyValueInfo->NameLength + sizeof(UNICODE_NULL);
+ if ((SpareData > DataEnd) || (SpareLength < RequiredLength))
+ {
+ /* Fail and return the missing length */
+ *InfoSize = (ULONG)(SpareData - (PCHAR)KeyValueInfo) + RequiredLength;
+ return STATUS_BUFFER_TOO_SMALL;
+ }
+ /* Check if this isn't a direct return */
+ if (!(QueryTable->Flags & RTL_QUERY_REGISTRY_DIRECT))
+ {
/* Copy the data and null-terminate it */
Name = (PWCHAR)SpareData;
RtlCopyMemory(Name, KeyValueInfo->Name, KeyValueInfo->NameLength);
@@ -330,7 +330,7 @@ RtlpCallQueryRegistryRoutine(IN PRTL_QUERY_REGISTRY_TABLE QueryTable,
RtlInitEmptyUnicodeString(&Source, Data, (USHORT)Length);
Source.Length = Source.MaximumLength - sizeof(UNICODE_NULL);
- /* Setup the desination string */
+ /* Setup the destination string */
RtlInitEmptyUnicodeString(&Destination, (PWCHAR)SpareData, 0);
/* Check if we're out of space */