| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
https://github.com/libnet/libnet/commit/4059e2ef7f277b962dc4a93bd2df9445361c7cca#r54752736
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
- Four space indent
- Braces on their own row, not cuddled
- No need for braces if only one statement, like return/goto
- Space between if and its parenthesis
- Variable decl. at top of function or block
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Fix unused parameter warnings
|
| |
| |
| |
| | |
Signed-off-by: Valery Ivanov <ivalery111@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|
|
|
|
| |
According to getifaddrs man page, ifa_addr can be NULL. Skip
such interfaces to avoid NULL dereference.
|
|\
| |
| | |
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>
|
| | |
|
|\ \
| | |
| | | |
Clean up some signed/unsigned comparisons
|
| |/ |
|
|\ \
| | |
| | | |
Cast pointer to (void*) to silence -Wextra warning
|
| |/ |
|
|/ |
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the last (unused) remnants of a Debian discussion about
checksumming odd sized packets.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=284729
The resulting code from this change is what we've had for several years
now, without any more bug reports. So I'm removing the unused code to
make it easier to read.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
|
|
|
|
| |
- Avoid assignment inside if-statements
- Add missing whitespace; if () rather than if()
- Spaces vs tabs
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
|
|
| |
Found by Valgrind
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
| |
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
|
| |
Modern systems declare this as `.. socklen_t)`, but older systems don't
use that. Use unsigned because its at least sign-compatible.
|
| |
|
|
|
|
|
|
| |
Found in https://codedocs.xyz/libnet/libnet.log
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Conflicts:
.gitignore
.travis.yml
BUILD-FROM-GIT.txt
Makefile.am
Makefile.am.common
Prepare
acinclude.m4
autogen.sh
configure.ac
doc/html/Makefile.am
doc/html/closed.png
doc/html/globals_func.html
doc/html/tab_s.png
doc/libnet.doxygen.conf
doc/man/Makefile.am
doc/man/man3/Makefile.am
doc/man/man3/libnet-functions.h.3
doc/man/man3/libnet-macros.h.3
include/libnet.h
include/libnet/Makefile.am
libnet/acinclude.m4
libnet/libnet-config.in
libnet/m4/acinclude.m4
lua/Makefile
lua/msvcbuild.bat
sample/Makefile.am
scripts/Push
src/libnet_link_win32.c
win32/Makefile.am
|
| |
|
|
|
|
|
|
|
|
|
| |
* In GLIBC since 2002
* Available in recetn uClibc,
https://github.com/hwoarang/uClibc/blob/master-metag/libc/inet/ifaddrs.c
* In OpenBSD since 2.7
Tested on OpenBSD with arping, compiled on linux by @sgeto
|
|
|
|
| |
Spotted by @sam-github
|
| |
|
| |
|