Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144329707
D53068.id164142.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
860 B
Referenced Files
None
Subscribers
None
D53068.id164142.diff
View Options
diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c
--- a/sys/netpfil/ipfw/ip_fw_nat.c
+++ b/sys/netpfil/ipfw/ip_fw_nat.c
@@ -999,9 +999,11 @@
{
struct cfg_nat *ptr;
struct ip_fw_chain *chain = &V_layer3_chain;
- int i;
+ int error, i;
- sooptcopyin(sopt, &i, sizeof i, sizeof i);
+ error = sooptcopyin(sopt, &i, sizeof i, sizeof i);
+ if (error != 0)
+ return (error);
/* XXX validate i */
IPFW_UH_WLOCK(chain);
ptr = lookup_nat(&chain->nat, i);
@@ -1104,7 +1106,7 @@
{
uint8_t *data;
struct cfg_nat *ptr;
- int i, size;
+ int error, i, size;
struct ip_fw_chain *chain;
IPFW_RLOCK_TRACKER;
@@ -1134,9 +1136,9 @@
i += LIBALIAS_BUF_SIZE;
}
IPFW_RUNLOCK(chain);
- sooptcopyout(sopt, data, size);
+ error = sooptcopyout(sopt, data, size);
free(data, M_IPFW);
- return(0);
+ return (error);
}
static int
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 8, 9:24 PM (2 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28499451
Default Alt Text
D53068.id164142.diff (860 B)
Attached To
Mode
D53068: ipfw: Check for errors from sooptcopyin() and sooptcopyout()
Attached
Detach File
Event Timeline
Log In to Comment