Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6768ecb6
Commit
6768ecb6
authored
Nov 18, 2003
by
Francois Gouget
Committed by
Alexandre Julliard
Nov 18, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scale the buffer sizes with MAX_LISTED_ENV_VAR.
Add a note about the limited buffer size used by the *Profile functions. Fix a couple of spelling errors.
parent
b76e8833
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
process.c
dlls/kernel/tests/process.c
+8
-6
No files found.
dlls/kernel/tests/process.c
View file @
6768ecb6
...
...
@@ -37,8 +37,10 @@ static char resfile[MAX_PATH];
static
int
myARGC
;
static
char
**
myARGV
;
/* as some environment variables get very long on Unix, we only test for
* the first 127 bytes
/* As some environment variables get very long on Unix, we only test for
* the first 127 bytes.
* Note that increasing this value past 256 may exceed the buffer size
* limitations of the *Profile functions (at least on Wine).
*/
#define MAX_LISTED_ENV_VAR 128
...
...
@@ -175,7 +177,7 @@ static void get_file_name(char* buf)
static
void
childPrintf
(
HANDLE
h
,
const
char
*
fmt
,
...)
{
va_list
valist
;
char
buffer
[
2048
];
char
buffer
[
1024
+
4
*
MAX_LISTED_ENV_VAR
];
DWORD
w
;
va_start
(
valist
,
fmt
);
...
...
@@ -345,7 +347,7 @@ static void doChild(const char* file, const char* option)
ok
(
ReadFile
(
hStdIn
,
buf
,
sizeof
(
buf
),
&
r
,
NULL
)
&&
r
>
0
,
"Reading message from input pipe"
);
childPrintf
(
hFile
,
"[StdHandle]
\n
msg=%s
\n\n
"
,
encodeA
(
buf
));
ok
(
WriteFile
(
hStdOut
,
buf
,
r
,
&
w
,
NULL
)
&&
w
==
r
,
"Writ
t
ing message to output pipe"
);
ok
(
WriteFile
(
hStdOut
,
buf
,
r
,
&
w
,
NULL
)
&&
w
==
r
,
"Writing message to output pipe"
);
}
}
...
...
@@ -361,7 +363,7 @@ static void doChild(const char* file, const char* option)
static
char
*
getChildString
(
const
char
*
sect
,
const
char
*
key
)
{
char
buf
[
1024
];
char
buf
[
1024
+
4
*
MAX_LISTED_ENV_VAR
];
char
*
ret
;
GetPrivateProfileStringA
(
sect
,
key
,
"-"
,
buf
,
sizeof
(
buf
),
resfile
);
...
...
@@ -1127,7 +1129,7 @@ static void test_Console(void)
ok
(
CloseHandle
(
hChildOutInh
),
"Closing handle"
);
msg_len
=
strlen
(
msg
)
+
1
;
ok
(
WriteFile
(
hParentOut
,
msg
,
msg_len
,
&
w
,
NULL
),
"Writ
t
ing to child"
);
ok
(
WriteFile
(
hParentOut
,
msg
,
msg_len
,
&
w
,
NULL
),
"Writing to child"
);
ok
(
w
==
msg_len
,
"Should have written %u bytes, actually wrote %lu"
,
msg_len
,
w
);
memset
(
buffer
,
0
,
sizeof
(
buffer
));
ok
(
ReadFile
(
hParentIn
,
buffer
,
sizeof
(
buffer
),
&
w
,
NULL
),
"Reading from child"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment