record.c (78ab59fee07f22464f32eafebab2bd97ba94ff2d) record.c (d3624466b56dd5b1886c1dff500525b544c19c83)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 *
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
5 *
6 */
7
8#include <linux/blkdev.h>

--- 205 unchanged lines hidden (view full) ---

214 } else {
215 /* Check if input attr inside record. */
216 off = PtrOffset(rec, attr);
217 if (off >= used)
218 return NULL;
219
220 asize = le32_to_cpu(attr->size);
221 if (asize < SIZEOF_RESIDENT) {
1// SPDX-License-Identifier: GPL-2.0
2/*
3 *
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
5 *
6 */
7
8#include <linux/blkdev.h>

--- 205 unchanged lines hidden (view full) ---

214 } else {
215 /* Check if input attr inside record. */
216 off = PtrOffset(rec, attr);
217 if (off >= used)
218 return NULL;
219
220 asize = le32_to_cpu(attr->size);
221 if (asize < SIZEOF_RESIDENT) {
222 /* Impossible 'cause we should not return such attribute */
222 /* Impossible 'cause we should not return such attribute. */
223 return NULL;
224 }
225
226 attr = Add2Ptr(attr, asize);
227 off += asize;
228 }
229
230 asize = le32_to_cpu(attr->size);

--- 375 unchanged lines hidden ---
223 return NULL;
224 }
225
226 attr = Add2Ptr(attr, asize);
227 off += asize;
228 }
229
230 asize = le32_to_cpu(attr->size);

--- 375 unchanged lines hidden ---