diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-06-08 13:22:47 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-06-08 13:22:47 +0000 |
commit | 3cdded03fa9a557f76612cf2b120d96af274e091 (patch) | |
tree | 10af6edad21a324d5f15dd2eae77e61186ea5d7b /usr.bin | |
parent | cddc2d3424a81d501fb5ff033fc2d4835dcb6cf6 (diff) |
properly check the passed tags if they are valid before attempting
the import.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/import.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c index e0bad5c1c69..252dbc5ab5b 100644 --- a/usr.bin/cvs/import.c +++ b/usr.bin/cvs/import.c @@ -1,4 +1,4 @@ -/* $OpenBSD: import.c,v 1.89 2008/05/22 15:45:01 tobias Exp $ */ +/* $OpenBSD: import.c,v 1.90 2008/06/08 13:22:46 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -95,16 +95,21 @@ cvs_import(int argc, char **argv) if (argc < 3) fatal("%s", cvs_cmd_import.cmd_synopsis); + import_repository = argv[0]; + vendor_tag = argv[1]; + release_tag = argv[2]; + + if (!rcs_sym_check(vendor_tag)) + fatal("invalid symbol: %s", vendor_tag); + if (!rcs_sym_check(release_tag)) + fatal("invalid symbol: %s", release_tag); + if (logmsg == NULL) logmsg = cvs_logmsg_create(NULL, NULL, NULL); if (logmsg == NULL) fatal("This shouldnt happen, honestly!"); - import_repository = argv[0]; - vendor_tag = argv[1]; - release_tag = argv[2]; - if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) { cvs_client_connect_to_server(); |