diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2020-01-22 14:18:00 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2020-02-07 08:53:40 +0000 |
commit | 91d4e79c279283dd6fc953a274b02b1957db84d8 (patch) | |
tree | 98d68994fe14da3bc979ef5dca011dbfc24da840 /librpc | |
parent | 490bbb96b9bd082a190a590a6137f0e24f80a6e4 (diff) | |
download | samba-91d4e79c279283dd6fc953a274b02b1957db84d8.tar.gz |
librpc ndr: Change loop index to size_t
Change the loop index in ndr_check_padding to size_t.
Credit to OSS-Fuzz
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20083
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14236
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/ndr/ndr_basic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c index 0811a590971..693d9c86e3a 100644 --- a/librpc/ndr/ndr_basic.c +++ b/librpc/ndr/ndr_basic.c @@ -44,7 +44,7 @@ static void ndr_dump_data(struct ndr_print *ndr, const uint8_t *buf, int len); _PUBLIC_ void ndr_check_padding(struct ndr_pull *ndr, size_t n) { size_t ofs2 = (ndr->offset + (n-1)) & ~(n-1); - int i; + size_t i; for (i=ndr->offset;i<ofs2;i++) { if (ndr->data[i] != 0) { break; |