| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| | |
|
| | |
|
|\ \
| |/
| | |
Fix potential name conflict with cpp keyword 'new'
|
|/ |
|
|\
| |
| | |
Fix unused parameter warnings
|
| |
| |
| |
| | |
Signed-off-by: Valery Ivanov <ivalery111@gmail.com>
|
|\ \
| | |
| | | |
Fix malloc return value checking; Fix potential memory leak
|
| |/ |
|
|\ \
| | |
| | | |
Remove unused variable in libnet_pblock.c
|
| |/
| |
| |
| | |
Signed-off-by: Valery Ivanov <ivalery111@gmail.com>
|
|\ \
| |/
|/| |
Fix a few gcc -fanalyzer warnings
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
libnet_cq.c:139:18: warning: dereference of possibly-NULL ‘new_18’ [CWE-690] [-Wanalyzer-possible-null-dereference]
139 | new->context = l;
| ~~~~~~~~~~~~~^~~
‘libnet_cq_add.part.0’: events 1-6
|
| 71 | libnet_cq_add(libnet_t *l, char *label)
| | ^~~~~~~~~~~~~
| | |
| | (1) entry to ‘libnet_cq_add.part.0’
|......
| 89 | if (label == NULL)
| | ~
| | |
| | (2) following ‘false’ branch (when ‘label_1(D)’ is non-NULL)...
|......
| 97 | if (l_cq == NULL)
| | ~~ ~
| | | |
| | | (4) following ‘false’ branch...
| | (3) ...to here
|......
| 124 | if (libnet_cq_dup_check(l, label))
| | ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | |
| | | (6) calling ‘libnet_cq_dup_check’ from ‘libnet_cq_add.part.0’
| | (5) ...to here
|
+--> ‘libnet_cq_dup_check’: events 7-13
|
| 269 | libnet_cq_dup_check(libnet_t *l, char *label)
| | ^~~~~~~~~~~~~~~~~~~
| | |
| | (7) entry to ‘libnet_cq_dup_check’
|......
| 273 | for (p = l_cq; p; p = p->next)
| | ~ ~~~~~~~~~~~
| | | |
| | | (13) ...to here
| | (8) following ‘true’ branch (when ‘p_6’ is non-NULL)...
| 274 | {
| 275 | if (p->context == l)
| | ~~ ~
| | | |
| | | (10) following ‘false’ branch...
| | (9) ...to here
|......
| 281 | if (strncmp(p->context->label, label, LIBNET_LABEL_SIZE) == 0)
| | ~~ ~
| | | |
| | | (12) following ‘false’ branch...
| | (11) ...to here
|
<------+
|
‘libnet_cq_add.part.0’: events 14-20
|
| 124 | if (libnet_cq_dup_check(l, label))
| | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | ||
| | |(14) returning to ‘libnet_cq_add.part.0’ from ‘libnet_cq_dup_check’
| | (15) following ‘false’ branch...
|......
| 130 | new = (libnet_cq_t *)malloc(sizeof (libnet_cq_t));
| | ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | |
| | | (17) this call could return NULL
| | (16) ...to here
| 131 | if (l_cq == NULL)
| | ~
| | |
| | (18) following ‘false’ branch...
|......
| 139 | new->context = l;
| | ~~~~~~~~~~~~~~~~
| | | |
| | | (20) ‘new_18’ could be NULL: unchecked value from (17)
| | (19) ...to here
|
Signed-off-by: Adrian Reber <areber@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Adrian Reber <areber@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes:
libnet_port_list.c:99:8: warning: leak of ‘_8’ [CWE-401] [-Wanalyzer-malloc-leak]
99 | if (!all_lists)
| ^
‘libnet_plist_chain_new’: events 1-3
|
| 48 | if (l == NULL)
| | ^
| | |
| | (1) following ‘false’ branch (when ‘l_70(D)’ is non-NULL)...
|......
| 53 | if (token_list == NULL)
| | ~~ ~
| | | |
| | | (3) following ‘false’ branch (when ‘token_list_71(D)’ is non-NULL)...
| | (2) ...to here
|
‘libnet_plist_chain_new’: event 4
|
|cc1:
| (4): ...to here
|
‘libnet_plist_chain_new’: events 5-9
|
| 83 | *plist = malloc(sizeof (libnet_plist_t));
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (5) allocated here
| 84 |
| 85 | if (!(*plist))
| | ~
| | |
| | (6) assuming ‘*plist_74(D)’ is non-NULL
| | (7) following ‘false’ branch...
|......
| 93 | tmp = *plist;
| | ~~~
| | |
| | (8) ...to here
|......
| 99 | if (!all_lists)
| | ~
| | |
| | (9) ‘_8’ leaks here; was allocated at (5)
|
Signed-off-by: Adrian Reber <areber@redhat.com>
|
|\
| |
| | |
Fix segmentation fault in libnet_ifaddrlist
|
|/
|
|
|
| |
According to getifaddrs man page, ifa_addr can be NULL. Skip
such interfaces to avoid NULL dereference.
|
|\
| |
| | |
Simplify fixmanpages
|
|/
|
|
|
| |
drop -d param to be more portable and reproducible.
ISO 8601 date format is fine, even if it differs from doxygen's
|
|\
| |
| | |
Make man-page generation reproducible
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
For this we behave similar to pod2man and use the input file mtime.
Also adapt date format to what doxygen-1.8.20 produces
to make the comment above true again.
LC_ALL=C is used so that %B is independent of language.
Also use UTC to be independent of timezone.
This patch was done while working on reproducible builds for openSUSE.
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|\
| |
| | |
Major license change: 4-clause BSD to 3-clause BSD
|
| |
| |
| |
| | |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adopts the 3-clause BSD license for all src/libnet_link_*.c
files previously under the 4-clause BSD license. Effectively this drops
the "obnoxious" advertising clause which is usually what is under most
contention when BSD licenses are discussed.
For a background, the https://en.wikipedia.org/wiki/BSD_licenses page
provides an interesting read. Briefly, in 1999 Berkeley rescinded the
original 3rd clause (see below) leading to a change in major software
projects to, not only adopt this new BSD license, but also renumber
the listed provisions.
Ref. ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|\ \
| | |
| | | |
Fix possible overflows
|
|/ / |
|
|\ \
| | |
| | | |
Fix C89 syntax error, and document C89 being the style
|
| |/ |
|
|\ \
| | |
| | | |
Clean up some signed/unsigned comparisons
|
| |/ |
|
|\ \
| | |
| | | |
Cast pointer to (void*) to silence -Wextra warning
|
| |/ |
|
|\ \
| |/
|/| |
Fix some non-standard types to build with -std=c18
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch updates the local getopt.c, used only when building samples
on Windows, with a newer version with better license from FreeBSD.
For reference, Berkeley recinded the 3rd clause of the original 4-clause
license in 1999. This was adopted by the BSD UNIX community, and later
the numbering was also updated.
https://bsd.slashdot.org/story/99/09/02/189210/berkeley-removes-advertising-clause
For some reason, the replacement header file, win32/getopt.h, comes with
the 2-clause BSD license. I did no more research on that, but I guess
the FreeBSD VCS has the complete story.
Related to issue #85.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not only is it our policy to not include binaries in GIT, the wpdpack
distribution comes under another license, see #85, which means libnet
top LICENSE file would otherwise have to be changed.
We recommend installing https://nmap.org/npcap/ for using libnet on
Windows. For cross-building on a non-windows host, see README.win32.
Closes #93
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
|
| |
Don't run release target in automated build since it checks for tags
and waits for human input. Instead we do the distcheck and doc
targets, which are the most important ones to check anyway.
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|