summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sss_client/nss_mc_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sss_client/nss_mc_common.c b/src/sss_client/nss_mc_common.c
index 59f5b257..f777890a 100644
--- a/src/sss_client/nss_mc_common.c
+++ b/src/sss_client/nss_mc_common.c
@@ -220,6 +220,11 @@ errno_t sss_nss_mc_get_record(struct sss_cli_mc_ctx *ctx,
continue;
}
+ if (!MC_CHECK_RECORD_LENGTH(ctx, rec)) {
+ /* record has invalid length */
+ return EINVAL;
+ }
+
if (rec_len > buf_size) {
free(copy_rec);
copy_rec = malloc(rec_len);