This commit was generated by cvs2svn to compensate for changes in r65016,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
Kris Kennaway 2000-08-23 09:25:05 +00:00
commit 4fbd047fee

View File

@ -80,7 +80,12 @@ main(int argc, char *argv[]) {
case 'p' : res.retrans = atoi(optarg);
break;
case 'h' : strcpy(name, optarg);
case 'h' : if (strlen(optarg) >= sizeof(name)) {
fprintf(stderr,
"Domain name too long (%s)\n", optarg);
exit(-1);
} else
strcpy(name, optarg);
break;
case 'c' : {
@ -158,7 +163,12 @@ main(int argc, char *argv[]) {
}
}
if (optind < argc)
strcpy(name, argv[optind]);
if (strlen(argv[optind]) >= sizeof(name)) {
fprintf(stderr,
"Domain name too long (%s)\n", argv[optind]);
exit(-1);
} else
strcpy(name, argv[optind]);
len = sizeof(answer);