diff --git a/.github/workflows/authors.yml b/.github/workflows/authors.yml index 242cadd181a4..633d4b73ec04 100644 --- a/.github/workflows/authors.yml +++ b/.github/workflows/authors.yml @@ -23,7 +23,7 @@ jobs: - name: Export known authors from master branch run: git log --format="%an <%ae>" origin/master | sort | uniq > authors.txt - name: Export authors from new commits - run: git log --format="%an <%ae>" origin/${GITHUB_BASE_REF}... | sort | uniq > commit-authors.txt + run: git log --format="%an <%ae>" ${{ github.event.pull_request.base.sha }}... | sort | uniq > commit-authors.txt - name: Check new authors run: | touch new-authors.txt diff --git a/rust/src/mqtt/mqtt.rs b/rust/src/mqtt/mqtt.rs index fbf03e19af69..3b09e4423cf8 100644 --- a/rust/src/mqtt/mqtt.rs +++ b/rust/src/mqtt/mqtt.rs @@ -433,8 +433,8 @@ impl MQTTState { let _pdu = Frame::new( flow, &stream_slice, - input, - current.len() as i64, + current, + (current.len() - rem.len()) as i64, MQTTFrameType::Pdu as u8, ); SCLogDebug!("request msg {:?}", msg); @@ -518,8 +518,8 @@ impl MQTTState { let _pdu = Frame::new( flow, &stream_slice, - input, - input.len() as i64, + current, + (current.len() - rem.len()) as i64, MQTTFrameType::Pdu as u8, ); diff --git a/src/detect-engine-loader.c b/src/detect-engine-loader.c index 9073c1e9c29d..153c056a85b4 100644 --- a/src/detect-engine-loader.c +++ b/src/detect-engine-loader.c @@ -578,8 +578,8 @@ static TmEcode DetectLoaderThreadInit(ThreadVars *t, const void *initdata, void DetectLoaderControl *loader = &loaders[ftd->instance]; SCMutexLock(&loader->m); - loader->tv = t; SCMutexUnlock(&loader->m); + loader->tv = t; return TM_ECODE_OK; } diff --git a/src/detect-engine-loader.h b/src/detect-engine-loader.h index 8a6f7b8f17be..f43ff9a5491c 100644 --- a/src/detect-engine-loader.h +++ b/src/detect-engine-loader.h @@ -43,10 +43,14 @@ typedef struct DetectLoaderTask_ { typedef struct DetectLoaderControl_ { int id; - int result; /* 0 for ok, error otherwise */ - ThreadVars *tv; /* loader threads threadvars - for waking them up */ - SCMutex m; - TAILQ_HEAD(, DetectLoaderTask_) task_list; + ThreadVars *tv; /**< loader threads threadvars - for waking them up */ + + /** struct to group members and mutex */ + struct { + SCMutex m; /**< mutex protects result and task_list */ + int result; /**< 0 for ok, error otherwise */ + TAILQ_HEAD(, DetectLoaderTask_) task_list; + }; } DetectLoaderControl; int DetectLoaderQueueTask(int loader_id, LoaderFunc Func, void *func_ctx, LoaderFreeFunc FreeFunc);