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

OISF / suricata / 22550936672

01 Mar 2026 07:34PM UTC coverage: 75.097% (+1.4%) from 73.687%
22550936672

Pull #14924

github

web-flow
github-actions: bump actions/download-artifact from 7.0.0 to 8.0.0

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/37930b1c2...70fc10c6e)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #14924: github-actions: bump actions/download-artifact from 7.0.0 to 8.0.0

238036 of 316972 relevant lines covered (75.1%)

2384615.4 hits per line

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

0.0
/src/util-lua-common.c
1
/* Copyright (C) 2014-2021 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
 * Common function for Lua Output
24
 */
25

26
#include "suricata-common.h"
27

28
#include "threads.h"
29
#include "threadvars.h"
30

31
#include "output.h"
32
#include "util-conf.h"
33

34
#include "lua.h"
35

36
#include "util-lua.h"
37
#include "util-lua-common.h"
38

39
int LuaCallbackError(lua_State *luastate, const char *msg)
40
{
×
41
    lua_pushnil(luastate);
×
42
    lua_pushstring(luastate, msg);
×
43
    return 2;
×
44
}
×
45

46
const char *LuaGetStringArgument(lua_State *luastate, int idx)
47
{
×
48
    /* get argument */
49
    if (!lua_isstring(luastate, idx))
×
50
        return NULL;
×
51
    const char *str = lua_tostring(luastate, idx);
×
52
    if (str == NULL)
×
53
        return NULL;
×
54
    if (strlen(str) == 0)
×
55
        return NULL;
×
56
    return str;
×
57
}
×
58

59
void LuaPushTableKeyValueInt(lua_State *luastate, const char *key, int value)
60
{
×
61
    lua_pushstring(luastate, key);
×
62
    lua_pushnumber(luastate, value);
×
63
    lua_settable(luastate, -3);
×
64
}
×
65

66
void LuaPushTableKeyValueBoolean(lua_State *luastate, const char *key, bool value)
67
{
×
68
    lua_pushstring(luastate, key);
×
69
    lua_pushboolean(luastate, value);
×
70
    lua_settable(luastate, -3);
×
71
}
×
72

73
/** \brief Push a key plus string value to the stack
74
 *
75
 *  If value is NULL, string "(null")" will be put on the stack.
76
 */
77
void LuaPushTableKeyValueString(lua_State *luastate, const char *key, const char *value)
78
{
×
79
    lua_pushstring(luastate, key);
×
80
    lua_pushstring(luastate, value ? value : "(null)");
×
81
    lua_settable(luastate, -3);
×
82
}
×
83

84
/** \brief Push a key plus string value with length to the stack.
85
 */
86
void LuaPushTableKeyValueLString(
87
        lua_State *luastate, const char *key, const char *value, size_t len)
88
{
×
89
    lua_pushstring(luastate, key);
×
90
    lua_pushlstring(luastate, value, len);
×
91
    lua_settable(luastate, -3);
×
92
}
×
93

94
void LuaPushTableKeyValueArray(
95
        lua_State *luastate, const char *key, const uint8_t *value, size_t len)
96
{
×
97
    lua_pushstring(luastate, key);
×
98
    LuaPushStringBuffer(luastate, value, len);
×
99
    lua_settable(luastate, -3);
×
100
}
×
101

102
int LuaStateNeedProto(lua_State *luastate, AppProto alproto)
103
{
×
104
    AppProto flow_alproto = 0;
×
105
    Flow *flow = LuaStateGetFlow(luastate);
×
106
    if (flow == NULL)
×
107
        return LuaCallbackError(luastate, "internal error: no flow");
×
108

109
    flow_alproto = flow->alproto;
×
110

111
    return (alproto == flow_alproto);
×
112
}
×
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