• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OISF / suricata / 22553697083

01 Mar 2026 09:58PM UTC coverage: 75.673% (+2.0%) from 73.687%
22553697083

Pull #14925

github

web-flow
Merge 288827f07 into 90823fa90
Pull Request #14925: hs: false positive coverity warning in a reference string v1

241615 of 319288 relevant lines covered (75.67%)

1333554.73 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/detect-lua.h
1
/* Copyright (C) 2007-2022 Open Information Security Foundation
2
 *
3
 * You can copy, redistribute or modify this Program under the terms of
4
 * the GNU General Public License version 2 as published by the Free
5
 * Software Foundation.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 * GNU General Public License for more details.
11
 *
12
 * You should have received a copy of the GNU General Public License
13
 * version 2 along with this program; if not, write to the Free Software
14
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15
 * 02110-1301, USA.
16
 */
17

18
/**
19
 * \file
20
 *
21
 * \author Victor Julien <victor@inliniac.net>
22
 */
23

24
#ifndef SURICATA_DETECT_LUA_H
25
#define SURICATA_DETECT_LUA_H
26

27
#include "util-lua.h"
28
#include "util-lua-sandbox.h"
29

30
typedef struct DetectLuaThreadData {
31
    lua_State *luastate;
32
    uint32_t flags;
33
} DetectLuaThreadData;
34

35
#define DETECT_LUA_MAX_FLOWVARS 15
×
36
#define DETECT_LUA_MAX_FLOWINTS 15
×
37
#define DETECT_LUA_MAX_BYTEVARS 15
×
38

39
typedef struct DetectLuaDataBytevarEntry_ {
40
    char *name;
41
    uint32_t id;
42
} DetectLuaDataBytevarEntry;
43

44
typedef struct DetectLuaData {
45
    int thread_ctx_id;
46
    int negated;
47
    char *filename;
48
    uint32_t flags;
49
    char *buffername; /* buffer name in case of a single buffer */
50
    uint32_t flowint[DETECT_LUA_MAX_FLOWINTS];
51
    uint16_t flowints;
52
    uint16_t flowvars;
53
    uint32_t flowvar[DETECT_LUA_MAX_FLOWVARS];
54
    uint16_t bytevars;
55
    DetectLuaDataBytevarEntry bytevar[DETECT_LUA_MAX_BYTEVARS];
56
    uint64_t alloc_limit;
57
    uint64_t instruction_limit;
58
    int allow_restricted_functions;
59
} DetectLuaData;
60

61
/* prototypes */
62
void DetectLuaRegister (void);
63
int DetectLuaMatchBuffer(DetectEngineThreadCtx *det_ctx,
64
        const Signature *s, const SigMatchData *smd,
65
        const uint8_t *buffer, uint32_t buffer_len, uint32_t offset,
66
        Flow *f);
67

68
void LuaDumpStack(lua_State *state, const char *prefix);
69

70
#endif /* SURICATA_DETECT_LUA_H */
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc