=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.275.2.1 retrieving revision 1.275.2.2 diff -u -r1.275.2.1 -r1.275.2.2 --- src/usr.bin/ssh/clientloop.c 2016/01/14 11:50:37 1.275.2.1 +++ src/usr.bin/ssh/clientloop.c 2016/01/27 12:19:42 1.275.2.2 @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.275.2.1 2016/01/14 11:50:37 sthen Exp $ */ +/* $OpenBSD: clientloop.c,v 1.275.2.2 2016/01/27 12:19:42 sthen Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -357,9 +357,9 @@ return -1; } do_unlink = 1; - if ((r = snprintf(xauthfile, sizeof(xauthfile), + if ((r = snprintf(xauthfile, PATH_MAX, "%s/xauthfile", xauthdir)) < 0 || - (size_t)r >= sizeof(xauthfile)) { + (size_t)r >= PATH_MAX) { error("%s: xauthfile path too long", __func__); unlink(xauthfile); rmdir(xauthdir);