All of lore.kernel.org
 help / color / mirror / Atom feed
* Buffer of by one in iptables.c in iptables v1.2.7a
@ 2003-02-21 14:24 Arvanitis Kostas
  2003-02-23 11:41 ` Patrick Schaaf
  0 siblings, 1 reply; 2+ messages in thread
From: Arvanitis Kostas @ 2003-02-21 14:24 UTC (permalink / raw)
  To: netfilter-devel; +Cc: arvanit

The line in find_target() that reads:

char path[sizeof(IPT_LIB_DIR) + sizeof("/libipt_.so") + strlen(name)]

is used as the target buffer for a sprintf() statement. However sprintf will 
also append a '\0' after the string, so the corrected line should be:

char path[sizeof(IPT_LIB_DIR) + sizeof("/libipt_.so") + strlen(name)+1]

This does not seem to affect the program, since path[] is allocated on the 
stack and there is nothing following it. However, for the shake of 
completeness, I think it should be corrected.

PS: Keep up the good work.
PS2: Is there a thought for iptables to take src/dst addresses as ranges in 
the form of ip_low - ip_high? (so as to be more compatible with the NAT-MIB)
-- 
A: No. See http://www.netmeister.org/news/learn2quote.html
Q: Should I include quotations after my reply ?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-23 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-21 14:24 Buffer of by one in iptables.c in iptables v1.2.7a Arvanitis Kostas
2003-02-23 11:41 ` Patrick Schaaf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.