OSDN Git Service

libss: initialize function pointer for readline_shutdown()
authorTheodore Ts'o <tytso@mit.edu>
Thu, 12 Nov 2009 22:54:45 +0000 (17:54 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 Nov 2009 22:54:45 +0000 (17:54 -0500)
Clear the function pointer for readline_shutdown() so that if libss is
linking against a readline library which doesn't supply a
readline_shutdown() function, ss_delete_invocation() won't seg fault.

Thanks to Solar Designer <solar@openwall.com> for reporting this
problem to me.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ss/invocation.c

index 074706f..74fcb14 100644 (file)
@@ -71,6 +71,7 @@ int ss_create_invocation(subsystem_name, version_string, info_ptr,
        *(new_table->rqt_tables+1) = (ss_request_table *) NULL;
 
        new_table->readline_handle = 0;
+       new_table->readline_shutdown = 0;
        new_table->readline = 0;
        new_table->add_history = 0;
        new_table->redisplay = 0;