The latest changes adding atexit left a coredump bug in dd.  After
parsing options closeout_func is set to zero.  But then in
close_stdout_wrapper the pointer closeout_func is dereferenced.  One
possible solution is to check the pointer before dereferencing it.
I included that patch here for reference.

Bob Proulx


diff -ur ../fileutils-4.0s.original/src/dd.c ./src/dd.c
--- ../fileutils-4.0s.original/src/dd.c Tue May 16 08:46:35 2000
+++ ./src/dd.c  Thu May 25 00:11:06 2000
@@ -1055,7 +1055,7 @@
 static void
 close_stdout_wrapper (void)
 {
-  if (*closeout_func)
+  if (closeout_func && *closeout_func)
     (*closeout_func) ();
 }

Reply via email to