=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/util.c,v retrieving revision 1.84 retrieving revision 1.85 diff -c -r1.84 -r1.85 *** src/usr.bin/cvs/util.c 2006/05/30 07:00:30 1.84 --- src/usr.bin/cvs/util.c 2006/05/30 19:30:11 1.85 *************** *** 1,4 **** ! /* $OpenBSD: util.c,v 1.84 2006/05/30 07:00:30 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink --- 1,4 ---- ! /* $OpenBSD: util.c,v 1.85 2006/05/30 19:30:11 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink *************** *** 602,614 **** if (cvs_cmdop == CVS_OP_IMPORT) { if (strlcpy(dst, import_repository, len) >= len) ! fatal("cvs_get_repository_name: overflow"); if (strlcat(dst, "/", len) >= len) ! fatal("cvs_get_repository_name: overflow"); ! } ! if (strlcat(dst, dir, len) >= len) ! fatal("cvs_get_repository_name: overflow"); } } --- 602,621 ---- if (cvs_cmdop == CVS_OP_IMPORT) { if (strlcpy(dst, import_repository, len) >= len) ! fatal("cvs_get_repository_name: truncation"); if (strlcat(dst, "/", len) >= len) ! fatal("cvs_get_repository_name: truncation"); ! if (strcmp(dir, ".")) { ! if (strlcat(dst, dir, len) >= len) { ! fatal("cvs_get_repository_name: " ! "truncation"); ! } ! } ! } else { ! if (strlcat(dst, dir, len) >= len) ! fatal("cvs_get_repository_name: truncation"); ! } } }