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

OISF / suricata / 22550902417

01 Mar 2026 07:32PM UTC coverage: 68.401% (-5.3%) from 73.687%
22550902417

Pull #14922

github

web-flow
github-actions: bump actions/upload-artifact from 6.0.0 to 7.0.0

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

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

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

218243 of 319063 relevant lines covered (68.4%)

3284926.58 hits per line

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

64.58
/src/decode-null.c
1
/* Copyright (C) 2015-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
 * \ingroup decode
20
 *
21
 * @{
22
 */
23

24
/**
25
 * \file
26
 *
27
 * \author Victor Julien <victor@inliniac.net>
28
 *
29
 * Decode linktype null:
30
 * http://www.tcpdump.org/linktypes.html
31
 */
32

33
#include "suricata-common.h"
34
#include "decode.h"
35
#include "decode-raw.h"
36
#include "decode-events.h"
37

38
#include "util-validate.h"
39
#include "util-unittest.h"
40
#include "util-debug.h"
41

42
#define HDR_SIZE 4
19,872✔
43

44
#define AF_INET6_BSD     24
×
45
#define AF_INET6_FREEBSD 28
×
46
#define AF_INET6_DARWIN  30
74✔
47
#define AF_INET6_LINUX   10
74✔
48
#define AF_INET6_SOLARIS 26
74✔
49
#define AF_INET6_WINSOCK 23
74✔
50

51
int DecodeNull(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p,
52
        const uint8_t *pkt, uint32_t len)
53
{
6,624✔
54
    DEBUG_VALIDATE_BUG_ON(pkt == NULL);
6,624✔
55

56
    StatsCounterIncr(&tv->stats, dtv->counter_null);
6,624✔
57

58
    if (unlikely(len < HDR_SIZE)) {
6,624✔
59
        ENGINE_SET_INVALID_EVENT(p, LTNULL_PKT_TOO_SMALL);
×
60
        return TM_ECODE_FAILED;
×
61
    }
×
62

63
    if (unlikely(GET_PKT_LEN(p) > HDR_SIZE + USHRT_MAX)) {
6,624✔
64
        return TM_ECODE_FAILED;
×
65
    }
×
66
#if __BYTE_ORDER__ == __BIG_ENDIAN
67
    uint32_t type = pkt[0] | pkt[1] << 8 | pkt[2] << 16 | pkt[3] << 24;
68
#else
69
    uint32_t type = *((uint32_t *)pkt);
6,624✔
70
#endif
6,624✔
71
    switch(type) {
6,624✔
72
        case AF_INET:
6,550✔
73
            SCLogDebug("IPV4 Packet");
6,550✔
74
            if (GET_PKT_LEN(p) - HDR_SIZE > USHRT_MAX) {
6,550✔
75
                return TM_ECODE_FAILED;
×
76
            }
×
77
            DecodeIPV4(
6,550✔
78
                    tv, dtv, p, GET_PKT_DATA(p) + HDR_SIZE, (uint16_t)(GET_PKT_LEN(p) - HDR_SIZE));
6,550✔
79
            break;
6,550✔
80
        case AF_INET6_BSD:
×
81
        case AF_INET6_FREEBSD:
×
82
        case AF_INET6_DARWIN:
74✔
83
        case AF_INET6_LINUX:
74✔
84
        case AF_INET6_SOLARIS:
74✔
85
        case AF_INET6_WINSOCK:
74✔
86
            SCLogDebug("IPV6 Packet");
74✔
87
            if (GET_PKT_LEN(p) - HDR_SIZE > USHRT_MAX) {
74✔
88
                return TM_ECODE_FAILED;
×
89
            }
×
90
            DecodeIPV6(
74✔
91
                    tv, dtv, p, GET_PKT_DATA(p) + HDR_SIZE, (uint16_t)(GET_PKT_LEN(p) - HDR_SIZE));
74✔
92
            break;
74✔
93
        default:
×
94
            SCLogDebug("Unknown Null packet type version %" PRIu32 "", type);
×
95
            ENGINE_SET_EVENT(p, LTNULL_UNSUPPORTED_TYPE);
×
96
            break;
×
97
    }
6,624✔
98
    return TM_ECODE_OK;
6,624✔
99
}
6,624✔
100

101
/**
102
 * @}
103
 */
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