-/* $OpenBSD: ldapclient.c,v 1.46 2022/10/13 04:55:33 jmatthew Exp $ */
+/* $OpenBSD: ldapclient.c,v 1.47 2023/03/31 03:38:26 jmatthew Exp $ */
/*
* Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org>
if (client_build_req(idm, &ir, m, min_attr, max_attr) == 0)
imsg_compose_event(env->sc_iev, type, 0, 0, -1,
- &ir, sizeof(ir));
+ &ir, sizeof(ir.ir_key) +
+ strlen(ir.ir_line) + 1);
aldap_freemsg(m);
}
-/* $OpenBSD: ypldap.c,v 1.23 2022/08/22 08:02:02 jmatthew Exp $ */
+/* $OpenBSD: ypldap.c,v 1.24 2023/03/31 03:38:26 jmatthew Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
if (env->update_trashed)
break;
- (void)memcpy(&ir, imsg.data, sizeof(ir));
+ (void)memcpy(&ir, imsg.data, n - IMSG_HEADER_SIZE);
if ((ue = calloc(1, sizeof(*ue))) == NULL ||
(ue->ue_line = strdup(ir.ir_line)) == NULL) {
/*
if (env->update_trashed)
break;
- (void)memcpy(&ir, imsg.data, sizeof(ir));
+ (void)memcpy(&ir, imsg.data, n - IMSG_HEADER_SIZE);
if ((ge = calloc(1, sizeof(*ge))) == NULL ||
(ge->ge_line = strdup(ir.ir_line)) == NULL) {
/*