All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix small bug in nfnl_subsys_open (uninitialized values)
@ 2006-12-28 18:58 Victor Stinner
  2006-12-29 20:43 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Victor Stinner @ 2006-12-28 18:58 UTC (permalink / raw)
  To: Netfilter Developer Mailing List

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

Hi,

I found a bug in libnfnetlink, function nfnl_subsys_open(). I attached a patch 
to fix it.

The problem is that callback structures weren't initialized. So sometimes, 
bytes are nul, sometimes... not.

Victor Stinner
http://www.inl.fr/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libnfnetlink_subsys_open.patch --]
[-- Type: text/x-diff; charset="us-ascii"; name="libnfnetlink_subsys_open.patch", Size: 366 bytes --]

Index: src/libnfnetlink.c
===================================================================
--- src/libnfnetlink.c	(révision 6716)
+++ src/libnfnetlink.c	(copie de travail)
@@ -244,7 +244,7 @@
 		return NULL;
 	}
 
-	ssh->cb = malloc(sizeof(*(ssh->cb)) * cb_count);
+	ssh->cb = calloc(cb_count, sizeof(*(ssh->cb)));
 	if (!ssh->cb)
 		return NULL;
 

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

* Re: Fix small bug in nfnl_subsys_open (uninitialized values)
  2006-12-28 18:58 Fix small bug in nfnl_subsys_open (uninitialized values) Victor Stinner
@ 2006-12-29 20:43 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2006-12-29 20:43 UTC (permalink / raw)
  To: Victor Stinner; +Cc: Netfilter Developer Mailing List

Victor Stinner wrote:
> I found a bug in libnfnetlink, function nfnl_subsys_open(). I attached a patch 
> to fix it.
> 
> The problem is that callback structures weren't initialized. So sometimes, 
> bytes are nul, sometimes... not.

Applied, thanks Victor.

-- 
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

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

end of thread, other threads:[~2006-12-29 20:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-28 18:58 Fix small bug in nfnl_subsys_open (uninitialized values) Victor Stinner
2006-12-29 20:43 ` Pablo Neira Ayuso

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.