diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-09-28 13:55:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:06 -0500 |
commit | ffbd9313e20ad3aa1c2f95c7e7731fd01cc60eaa (patch) | |
tree | e5713d3820d6a2489118357fe912c925abe3baae /testprogs/win32 | |
parent | 4ad69c3deec3470849270fb180a78f8a4e78f854 (diff) | |
download | samba-ffbd9313e20ad3aa1c2f95c7e7731fd01cc60eaa.tar.gz |
r10577: Fix error in ReadFile()
(This used to be commit 04b8c473d7d55d4d802631074843e43fe7d9cfea)
Diffstat (limited to 'testprogs/win32')
-rwxr-xr-x | testprogs/win32/npecho/npecho_client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testprogs/win32/npecho/npecho_client.c b/testprogs/win32/npecho/npecho_client.c index 4131bd37924..97d31c43184 100755 --- a/testprogs/win32/npecho/npecho_client.c +++ b/testprogs/win32/npecho/npecho_client.c @@ -13,7 +13,7 @@ int main(int argc, char *argv[]) { HANDLE h; DWORD numread = 0; - char outbuffer[512]; + char *outbuffer = malloc(strlen(ECHODATA)); if (argc == 1) { printf("Usage: %s pipename\n", argv[0]); @@ -27,12 +27,12 @@ int main(int argc, char *argv[]) return -1; } - if (!WriteFile(h, ECHODATA, strlen(ECHODATA), NULL, NULL)) { + if (!WriteFile(h, ECHODATA, strlen(ECHODATA), &numread, NULL)) { printf("Error writing: %d\n", GetLastError()); return -1; } - if (!ReadFile(h, outbuffer, strlen(ECHODATA), NULL, NULL)) { + if (!ReadFile(h, outbuffer, strlen(ECHODATA), &numread, NULL)) { printf("Error reading: %d\n", GetLastError()); return -1; } |