Rob Shearman : rpcrt4: Don'
t use add on the sizes of array elements to an open-ended structure;
use FIELD_OFFSET with the array index instead.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jun 26 07:11:45 CDT 2007
Module: wine
Branch: master
Commit: 73c31ed309893628240cf7ee00e9c1635a87a5a8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=73c31ed309893628240cf7ee00e9c1635a87a5a8
Author: Rob Shearman <rob at codeweavers.com>
Date: Mon Jun 25 14:21:20 2007 +0100
rpcrt4: Don't use add on the sizes of array elements to an open-ended structure; use FIELD_OFFSET with the array index instead.
---
dlls/rpcrt4/tests/server.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index a0291e0..ceb083b 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -560,7 +560,7 @@ array_tests(void)
ok(sum_var_array(&c[2], 0) == 0, "RPC sum_conf_array\n");
ok(dot_two_vectors(vs) == -4, "RPC dot_two_vectors\n");
- cs = HeapAlloc(GetProcessHeap(), 0, offsetof(cs_t, ca) + 5 * sizeof cs->ca[0]);
+ cs = HeapAlloc(GetProcessHeap(), 0, FIELD_OFFSET(cs_t, ca[5]));
cs->n = 5;
cs->ca[0] = 3;
cs->ca[1] = 5;
More information about the wine-cvs
mailing list