diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-12-14 09:44:16 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-12-14 09:44:16 +0000 |
commit | 27619f5447f19e4871fe10c243fcddf2a1dd4a3c (patch) | |
tree | 288719e73a6e5cf10b822214cbb4f7eb13c77fb9 | |
parent | 251f3d9aff8ae91f82b3fe3793a8eaaa9b03f7f4 (diff) |
Use proper len in strndup() call for the style argument.
OK matthieu@
-rw-r--r-- | app/xlockmore/xlock/privsep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/xlockmore/xlock/privsep.c b/app/xlockmore/xlock/privsep.c index 42dc800f1..f7ddac2ea 100644 --- a/app/xlockmore/xlock/privsep.c +++ b/app/xlockmore/xlock/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.2 2022/07/07 05:00:19 semarie Exp $ */ +/* $OpenBSD: privsep.c,v 1.3 2023/12/14 09:44:15 claudio Exp $ */ /* * Copyright 2001 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -178,7 +178,7 @@ receive_cmd(struct imsgbuf *ibuf, char **name, char **pass, char **style) goto nomem; data += hdr.passlen; if (hdr.stylelen != 0) { - *style = strndup(data, hdr.passlen); + *style = strndup(data, hdr.stylelen); if (*style == NULL) goto nomem; } else |