about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/xdr-arity.patch
blob: 5d0328629f198049b3b2c294ba0933d86c0dac9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
diff --git a/lib/sec_xdr.c b/lib/sec_xdr.c
index fe5f038..6239b6c 100644
--- a/lib/sec_xdr.c
+++ b/lib/sec_xdr.c
@@ -223,7 +223,7 @@ bool_t copyin(void *data, xdrproc_t proc, void** copy, u_int *size)
     sec_xdrmem_create(&xdr, (char *)xdr_data, length, XDR_ENCODE);
 
     // cast to void* - function can go both ways (xdr->x_op) 
-    if (proc(&xdr, data)) {
+    if (proc(&xdr, data, 0)) {
         *copy = xdr_data;
         if (size) *size = length;
         return (TRUE);
@@ -261,7 +261,7 @@ bool_t copyout(const void *copy, u_int size, xdrproc_t proc, void **data, u_int
     if (!sec_xdr_arena_init(&arena, &xdr, length_out ? length_out : length_required, length_out ? *data : NULL))
         return (FALSE);
 
-    if (proc(&xdr, data))
+    if (proc(&xdr, data, 0))
     {
         *length = length_required;
         return (TRUE);
@@ -284,7 +284,7 @@ bool_t copyout_chunked(const void *copy, u_int size, xdrproc_t proc, void **data
 
     void *data_out = NULL;
 
-    if (proc(&xdr, &data_out))
+    if (proc(&xdr, &data_out, 0))
     {
         *data = data_out;
         return (TRUE);
diff --git a/lib/sec_xdr_array.c b/lib/sec_xdr_array.c
index 152a71b..e5ec1ad 100644
--- a/lib/sec_xdr_array.c
+++ b/lib/sec_xdr_array.c
@@ -147,7 +147,7 @@ sec_xdr_array(XDR *xdrs, uint8_t **addrp, u_int *sizep, u_int maxsize, u_int els
     for (i = 0; (i < c) && stat; i++) {
         if ((xdrs->x_op == XDR_DECODE) && sizeof_alloc)
             memset(obj, 0, elsize);
-        stat = (*elproc)(xdrs, target);
+        stat = (*elproc)(xdrs, target, 0);
         if ((xdrs->x_op == XDR_ENCODE) || !sizeof_alloc)
             target += elsize;
     }
diff --git a/lib/sec_xdr_reference.c b/lib/sec_xdr_reference.c
index a66fb37..ab5b4c4 100644
--- a/lib/sec_xdr_reference.c
+++ b/lib/sec_xdr_reference.c
@@ -121,7 +121,7 @@ sec_xdr_reference(XDR *xdrs, uint8_t **pp, u_int size, xdrproc_t proc)
                 break;
             }
 
-    stat = (*proc)(xdrs, loc);
+    stat = (*proc)(xdrs, loc, 0);
 
     if (xdrs->x_op == XDR_FREE) {
         sec_mem_free(xdrs, loc, size);
diff --git a/lib/sec_xdr_sizeof.c b/lib/sec_xdr_sizeof.c
index a18bcd0..8c33dbc 100644
--- a/lib/sec_xdr_sizeof.c
+++ b/lib/sec_xdr_sizeof.c
@@ -190,7 +190,7 @@ sec_xdr_sizeof_in(func, data)
 
     sec_xdr_arena_allocator_t size_alloc;
     sec_xdr_arena_init_size_alloc(&size_alloc, &x);
-    stat = func(&x, data);
+    stat = func(&x, data, 0);
     if (x.x_private)
         free(x.x_private);
     return (stat == TRUE ? (unsigned) x.x_handy: 0);
@@ -210,7 +210,7 @@ sec_xdr_sizeof_out(copy, size, func, data)
 
     sec_xdr_arena_allocator_t size_alloc;
     sec_xdr_arena_init_size_alloc(&size_alloc, &x);
-    stat = func(&x, data);
+    stat = func(&x, data, 0);
     if (size_alloc.data)
         free(size_alloc.data);
     return (stat == TRUE ? (unsigned long)size_alloc.offset : 0);