From c4db6faa7fefab51b2d55453a5afbf67bf8629cb Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 4 Feb 2018 22:09:33 +0000 Subject: [PATCH] use sizeof, rather than the constant. on change in binary. --- bin/ls/ls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ls/ls.c b/bin/ls/ls.c index e22d404243b..1e28c9fe213 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ls.c,v 1.49 2018/02/04 21:53:54 deraadt Exp $ */ +/* $OpenBSD: ls.c,v 1.50 2018/02/04 22:09:33 deraadt Exp $ */ /* $NetBSD: ls.c,v 1.18 1996/07/09 09:16:29 mycroft Exp $ */ /* @@ -493,8 +493,8 @@ display(FTSENT *p, FTSENT *list) btotal += sp->st_blocks; if (f_longform) { if (f_numericonly) { - snprintf(nuser, 12, "%u", sp->st_uid); - snprintf(ngroup, 12, "%u", sp->st_gid); + snprintf(nuser, sizeof nuser, "%u", sp->st_uid); + snprintf(ngroup, sizeof nuser, "%u", sp->st_gid); user = nuser; group = ngroup; } else { -- 2.20.1