autofs: fix segment fault on musl when running in debug mode.
This commit is contained in:
parent
ef108f37de
commit
4db519dcbf
2 changed files with 16 additions and 1 deletions
|
@ -28,3 +28,18 @@
|
|||
#include "automount.h"
|
||||
#if defined(LIBXML2_WORKAROUND) || defined(TIRPC_WORKAROUND)
|
||||
#include <dlfcn.h>
|
||||
--- lib/log.c.orig 2019-03-30 10:49:52.965336128 +0100
|
||||
+++ lib/log.c 2019-03-30 10:50:43.232710045 +0100
|
||||
@@ -38,7 +38,11 @@ static char *prepare_attempt_prefix(cons
|
||||
char buffer[ATTEMPT_ID_SIZE + 1];
|
||||
char *prefixed_msg = NULL;
|
||||
|
||||
- attempt_id = pthread_getspecific(key_thread_attempt_id);
|
||||
+ if (key_thread_attempt_id) {
|
||||
+ attempt_id = pthread_getspecific(key_thread_attempt_id);
|
||||
+ } else {
|
||||
+ attempt_id = 0;
|
||||
+ }
|
||||
if (attempt_id) {
|
||||
int len = sizeof(buffer) + 1 + strlen(msg) + 1;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'autofs'
|
||||
pkgname=autofs
|
||||
version=5.1.5
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=gnu-configure
|
||||
make_build_args="DONTSTRIP=1"
|
||||
configure_args="--with-libtirpc --with-mapdir=/etc/autofs --sbindir=/usr/bin"
|
||||
|
|
Loading…
Reference in a new issue