]> git.pld-linux.org Git - packages/sssd.git/blob - array-size.patch
rebuild with separate debuginfo build-ids
[packages/sssd.git] / array-size.patch
1 diff -urNp -x '*.orig' sssd-1.13.4.org/src/providers/ad/ad_gpo_ndr.c sssd-1.13.4/src/providers/ad/ad_gpo_ndr.c
2 --- sssd-1.13.4.org/src/providers/ad/ad_gpo_ndr.c       2016-04-13 16:48:41.000000000 +0200
3 +++ sssd-1.13.4/src/providers/ad/ad_gpo_ndr.c   2021-03-03 21:59:14.896225612 +0100
4 @@ -258,7 +258,7 @@ ndr_pull_dom_sid(struct ndr_pull *ndr,
5          NDR_CHECK(ndr_pull_align(ndr, 4));
6          NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sid_rev_num));
7          NDR_CHECK(ndr_pull_int8(ndr, NDR_SCALARS, &r->num_auths));
8 -        if (r->num_auths < 0 || r->num_auths > ARRAY_SIZE(r->sub_auths)) {
9 +        if (r->num_auths < 0 || r->num_auths > N_ELEMENTS(r->sub_auths)) {
10              return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
11          }
12          NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6));
13 diff -urNp -x '*.orig' sssd-1.13.4.org/src/util/util.h sssd-1.13.4/src/util/util.h
14 --- sssd-1.13.4.org/src/util/util.h     2016-04-13 16:48:41.000000000 +0200
15 +++ sssd-1.13.4/src/util/util.h 2021-03-03 21:59:14.896225612 +0100
16 @@ -587,4 +587,8 @@ int sss_unique_file(TALLOC_CTX *owner,
17   */
18  int sss_unique_filename(TALLOC_CTX *owner, char *path_tmpl);
19  
20 +#ifndef N_ELEMENTS
21 +#define N_ELEMENTS(arr) (sizeof(arr) / sizeof(arr[0]))
22 +#endif
23 +
24  #endif /* __SSSD_UTIL_H__ */
This page took 0.051416 seconds and 3 git commands to generate.