=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/client.c,v retrieving revision 1.40 retrieving revision 1.41 diff -c -r1.40 -r1.41 *** src/usr.bin/cvs/client.c 2006/12/21 22:32:30 1.40 --- src/usr.bin/cvs/client.c 2007/01/02 23:55:15 1.41 *************** *** 1,4 **** ! /* $OpenBSD: client.c,v 1.40 2006/12/21 22:32:30 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink * --- 1,4 ---- ! /* $OpenBSD: client.c,v 1.41 2007/01/02 23:55:15 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * *************** *** 741,764 **** void cvs_client_remove_entry(char *data) { CVSENTRIES *entlist; ! struct cvs_ent *ent; ! char *dir, *entry; ! dir = cvs_remote_input(); ! entry = cvs_remote_input(); ! xfree(dir); ! if ((ent = cvs_ent_parse(entry)) == NULL) ! fatal("cvs_client_remove_entry: cvs_ent_parse failed"); ! entlist = cvs_ent_open(data); ! cvs_ent_remove(entlist, ent->ce_name); ! cvs_ent_free(ent); cvs_ent_close(entlist, ENT_SYNC); ! xfree(entry); } void --- 741,767 ---- void cvs_client_remove_entry(char *data) { + int l; CVSENTRIES *entlist; ! char *filename, *rpath, *fpath; ! rpath = cvs_remote_input(); ! if ((filename = strrchr(rpath, '/')) == NULL) ! fatal("bad rpath in cvs_client_remove_entry: %s", rpath); ! *filename++; ! fpath = xmalloc(MAXPATHLEN); ! l = snprintf(fpath, MAXPATHLEN, "%s%s", data, filename); ! if (l == -1 || l >= MAXPATHLEN) ! fatal("cvs_client_remove_entry: overflow"); ! xfree(rpath); ! entlist = cvs_ent_open(data); ! cvs_ent_remove(entlist, fpath); cvs_ent_close(entlist, ENT_SYNC); ! xfree(fpath); } void