mirror of
https://github.com/reactos/reactos.git
synced 2025-07-14 20:14:13 +00:00
[WS2_32_NEW]
- Add missing null termination for the line buffer in GetProtoGetNextEnt. Patch by Víctor Martínez Calvo. CID 716700 CORE-11218 #resolve svn path=/trunk/; revision=71292
This commit is contained in:
parent
7c3631a94b
commit
274daad96e
1 changed files with 6 additions and 3 deletions
|
@ -72,7 +72,7 @@ GetProtoOpenNetworkDatabase(PCHAR Name)
|
||||||
NULL,
|
NULL,
|
||||||
OPEN_EXISTING,
|
OPEN_EXISTING,
|
||||||
FILE_ATTRIBUTE_NORMAL,
|
FILE_ATTRIBUTE_NORMAL,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
PCHAR
|
PCHAR
|
||||||
|
@ -118,6 +118,9 @@ GetProtoGetNextEnt(IN HANDLE DbHandle,
|
||||||
&Read,
|
&Read,
|
||||||
NULL)) return NULL;
|
NULL)) return NULL;
|
||||||
|
|
||||||
|
/* Null terminate LineBuffer */
|
||||||
|
Buffer->LineBuffer[Read] = ANSI_NULL;
|
||||||
|
|
||||||
/* Find out where the line ends */
|
/* Find out where the line ends */
|
||||||
p1 = Buffer->LineBuffer;
|
p1 = Buffer->LineBuffer;
|
||||||
p = strchr(Buffer->LineBuffer, '\n');
|
p = strchr(Buffer->LineBuffer, '\n');
|
||||||
|
@ -212,7 +215,7 @@ getprotobynumber(IN INT number)
|
||||||
PWSTHREAD Thread;
|
PWSTHREAD Thread;
|
||||||
INT ErrorCode;
|
INT ErrorCode;
|
||||||
PPROTOENT Protoent;
|
PPROTOENT Protoent;
|
||||||
PVOID GetProtoBuffer;
|
PVOID GetProtoBuffer;
|
||||||
HANDLE DbHandle;
|
HANDLE DbHandle;
|
||||||
DPRINT("getprotobynumber: %lx\n", number);
|
DPRINT("getprotobynumber: %lx\n", number);
|
||||||
|
|
||||||
|
@ -276,7 +279,7 @@ getprotobyname(IN CONST CHAR FAR *name)
|
||||||
PWSTHREAD Thread;
|
PWSTHREAD Thread;
|
||||||
INT ErrorCode;
|
INT ErrorCode;
|
||||||
PPROTOENT Protoent;
|
PPROTOENT Protoent;
|
||||||
PVOID GetProtoBuffer;
|
PVOID GetProtoBuffer;
|
||||||
HANDLE DbHandle;
|
HANDLE DbHandle;
|
||||||
DPRINT("getprotobyname: %s\n", name);
|
DPRINT("getprotobyname: %s\n", name);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue