FreeBSD Bugzilla – Attachment 7983 Details for
Bug 16953
[PATCH] Fix argument overflow in dnsquery
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.37 KB, created by
spock
on 2000-02-24 06:30:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
spock
Created:
2000-02-24 06:30:01 UTC
Size:
1.37 KB
patch
obsolete
>Index: contrib/bind/bin/dnsquery/dnsquery.c >=================================================================== >RCS file: /home/ncvs/src/contrib/bind/bin/dnsquery/dnsquery.c,v >retrieving revision 1.1.1.2 >diff -u -r1.1.1.2 dnsquery.c >--- dnsquery.c 1999/11/30 02:42:02 1.1.1.2 >+++ dnsquery.c 2000/02/24 06:09:09 >@@ -80,7 +80,11 @@ > case 'p' : res.retrans = atoi(optarg); > break; > >- case 'h' : strcpy(name, optarg); >+ case 'h' : if(strlcpy(name, optarg, sizeof(name)) >= sizeof(name)) { >+ fprintf(stderr, >+ "Domain name too long (%s)\n", optarg); >+ exit(-1); >+ } > break; > > case 'c' : { >@@ -157,9 +161,14 @@ > exit(-1); > } > } >- if (optind < argc) >- strcpy(name, argv[optind]); >- >+ if (optind < argc) { >+ if (strlcpy(name, argv[optind], sizeof(name)) >= sizeof(name)){ >+ fprintf(stderr, >+ "Domain name too long (%s)\n", argv[optind]); >+ exit(-1); >+ } >+ } >+ > len = sizeof(answer); > > if (!(res.options & RES_INIT))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 16953
: 7983