mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-21 09:06:21 +00:00
fix(review): address PR #105 review follow-ups
- src/log.c: log_stderr_init no longer closes STDERR_FILENO immediately
after dup2(). The previous 'close(dup_fd)' closed fd 2 because dup2
returns newfd on success; the in-app stderr capture pipe was silently
dead, dropping libstrophe/openssl error output. Close the original
stderr_pipe[1] instead and remember that the write end now lives at
STDERR_FILENO so _log_stderr_close stays correct.
- src/database_sqlite.c: NULL-check sqlite3_mprintf result before
passing it to sqlite3_exec in the DbVersion bootstrap path.
- src/tools/editor.c: drop three orphan #includes (<fcntl.h>,
<pthread.h>, <readline/readline.h>) left behind when 9b03e3a50
removed the async-editor path.
- src/xmpp/jid.c: match the g_new0 allocation in jid_create with
g_free in jid_destroy. Same behaviour on glibc but stops being a
foot-gun under custom glib allocators.
Verified with ci-build.sh in Debian docker: all 4 configs pass
(644/0, 605/0, 605/0, 644/0 unit + 130/0 functional).
This commit is contained in:
@@ -9,14 +9,11 @@
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later WITH OpenSSL-exception
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <glib.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h> // necessary for readline
|
||||
#include <readline/readline.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "config/files.h"
|
||||
|
||||
Reference in New Issue
Block a user