FreeBSD Bugzilla – Attachment 9654 Details for
Bug 19688
Some boundry checking KASSERTS in networking code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 918 bytes, created by
dgilbert
on 2000-07-04 04:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
dgilbert
Created:
2000-07-04 04:20:00 UTC
Size:
918 bytes
patch
obsolete
>--- /sys/net/hostcache.c Fri Aug 27 20:48:15 1999 >+++ hostcache.c Mon Jul 3 23:08:34 2000 >@@ -55,6 +55,8 @@ > struct hchead *heads; > u_long nelem; > >+ KASSERT(af >= 0 && af < AF_MAX, ("hc_init: af=%d out of range", af)); >+ > hct = &hctable[af]; > nelem = init_nelem; > if (hct->hct_nentries) >@@ -86,6 +88,9 @@ > struct hctable *hct; > int s; > >+ KASSERT(sa->sa_family >=0 && sa->sa_family < AF_MAX, >+ ("hc_get: sa_family=%d out o frange", sa->sa_family)); >+ > hct = &hctable[sa->sa_family]; > if (hct->hct_nentries == 0) > return 0; >@@ -150,6 +155,10 @@ > u_long hash; > int s; > >+ KASSERT(hc->hc_host->sa_family >=0 && hc->hc_host->sa_family < AF_MAX, >+ ("hc_insert: sa_family=%d out of range", >+ hc->hc_host->sa_family)); >+ > hct = &hctable[hc->hc_host->sa_family]; > hash = hct->hct_cb->hccb_hash(hc->hc_host, hct->hct_nentries);
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 19688
: 9654