https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f36cbf75e3aaf432a46ed…
commit f36cbf75e3aaf432a46edd145e5d54bc120f7bca
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Thu Feb 14 10:48:32 2019 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Thu Feb 14 10:48:32 2019 +0100
[FASTFAT] On volume open, update share access if volume was already open
It was never updated afterwards, leading to a totally loss of share
access information amongst callers.
---
drivers/filesystems/fastfat/create.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/filesystems/fastfat/create.c b/drivers/filesystems/fastfat/create.c
index 22ce0a54ff..aadc990e37 100644
--- a/drivers/filesystems/fastfat/create.c
+++ b/drivers/filesystems/fastfat/create.c
@@ -523,7 +523,7 @@ VfatCreateFile(
Stack->Parameters.Create.ShareAccess,
FileObject,
&pFcb->FCBShareAccess,
- FALSE);
+ TRUE);
if (!NT_SUCCESS(Status))
{
vfatAddToStat(DeviceExt, Fat.FailedCreates, 1);
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=42515190c53d45e282a8d…
commit 42515190c53d45e282a8d6eea4dfa917bfc1f170
Author: Julian Kirsch <kirschju(a)sec.in.tum.de>
AuthorDate: Wed Feb 13 13:12:52 2019 +0100
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Feb 13 13:12:52 2019 +0100
[NSLOOKUP] Fix crash in case of no network connectivity (#1354)
Prevent nslookup.exe from crashing when executed in a ROS VM with no network
interfaces. This is due to a NULL pointer dereference occurring if
`GetNetworkParams` in `main` fails with an error other than
`ERROR_BUFFER_OVERFLOW`. In this case, `pNetInfo` remains initialized to
NULL, causing `strncpy` to crash.
---
base/applications/network/nslookup/nslookup.c | 35 +++++++++++++++------------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/base/applications/network/nslookup/nslookup.c b/base/applications/network/nslookup/nslookup.c
index 6f80dfae1e..d86803eb3a 100644
--- a/base/applications/network/nslookup/nslookup.c
+++ b/base/applications/network/nslookup/nslookup.c
@@ -792,26 +792,31 @@ int main( int argc, char* argv[] )
/* We don't know how long of a buffer it will want to return. So we'll
pass an empty one now and let it fail only once, instead of guessing. */
Status = GetNetworkParams( pNetInfo, &NetBufLen );
- if( Status == ERROR_BUFFER_OVERFLOW )
+
+ if( Status != ERROR_BUFFER_OVERFLOW )
{
- pNetInfo = (PFIXED_INFO)HeapAlloc( ProcessHeap, 0, NetBufLen );
- if( pNetInfo == NULL )
- {
- _tprintf( _T("ERROR: Out of memory\n") );
+ _tprintf( _T("Error in GetNetworkParams call\n") );
- return -1;
- }
+ return -2;
+ }
- /* For real this time. */
- Status = GetNetworkParams( pNetInfo, &NetBufLen );
- if( Status != NO_ERROR )
- {
- _tprintf( _T("Error in GetNetworkParams call\n") );
+ pNetInfo = (PFIXED_INFO)HeapAlloc( ProcessHeap, 0, NetBufLen );
+ if( pNetInfo == NULL )
+ {
+ _tprintf( _T("ERROR: Out of memory\n") );
- HeapFree( ProcessHeap, 0, pNetInfo );
+ return -1;
+ }
- return -2;
- }
+ /* For real this time. */
+ Status = GetNetworkParams( pNetInfo, &NetBufLen );
+ if( Status != NO_ERROR )
+ {
+ _tprintf( _T("Error in GetNetworkParams call\n") );
+
+ HeapFree( ProcessHeap, 0, pNetInfo );
+
+ return -2;
}
strncpy( State.domain, pNetInfo->DomainName, 255 );