Ferry Huberts [Fri, 9 Nov 2012 16:55:47 +0000 (17:55 +0100)]
hna_set: explicitly cast to (time_t *) in calls to localtime()
To make it build on win64
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 9 Nov 2012 16:53:51 +0000 (17:53 +0100)]
win32: remove unused getpid() function
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 9 Nov 2012 16:52:54 +0000 (17:52 +0100)]
main: do not seed the random number generator with the process id
We now seed it with the current time. This is predictable as well
but getpid() is not compatible with the windows 64bits mingw build.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 5 Nov 2012 16:34:37 +0000 (17:34 +0100)]
tas: remove plugin
Unmaintained for a long time, no response on removal announcement,
no known users.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 21:51:08 +0000 (22:51 +0100)]
gateway: simplify stopping the cleanup timer
To make the code of olsr_delete_gateway_tree_entry consistent with
that of olsr_update_gateway_entry
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 16:36:12 +0000 (17:36 +0100)]
gui: linux: fix the string buffer overflow better
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 16:20:33 +0000 (17:20 +0100)]
gui: linux: fix string buffer overflow
Coverity:
CID 742359 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
At (2): You might overrun the 10 byte fixed-size string "tmp" by copying
the return value of "g_locale_to_utf8(gchar const *, gssize,
gsize *, gsize *, GError **)" without checking the length.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 16:17:22 +0000 (17:17 +0100)]
gui: linux: fix string buffer overflow
Coverity:
CID 742358 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
At (1): You might overrun the 255 byte fixed-size string "title" by
copying the return value of "ip_to_string(union olsr_ip_addr *)"
without checking the length.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 16:10:25 +0000 (17:10 +0100)]
gui: linux: fix inccorrect sizeof()
Coverity:
CID 742357 (#1 of 1): Incorrect sizeof expression (BAD_SIZEOF)
Taking the size of arithmetic expression "512 + 1" is suspicious.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 15:56:58 +0000 (16:56 +0100)]
gui: linux: fix some 'shadow' compiler warnings
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 15:36:42 +0000 (16:36 +0100)]
gui: linux: fix some 'may be used uninitialized' compiler warnings
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 15:36:18 +0000 (16:36 +0100)]
Revert "gui: linux: fix some 'may be used uninitialized' compiler warnings"
This reverts commit
b27a04dd3106a7123810c066d59362ec6e7a7c64.
Ferry Huberts [Wed, 7 Nov 2012 13:56:47 +0000 (14:56 +0100)]
gui: linux: fix some 'unused parameter' compiler warnings
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 13:51:49 +0000 (14:51 +0100)]
gui: linux: fix a 'mixed declarations and code' compiler warning
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 13:46:04 +0000 (14:46 +0100)]
gui: linux: fix 'too few arguments to function ipc_connect' compiler warning
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 13:42:59 +0000 (14:42 +0100)]
gui: linux: fix some 'old-style function definition' compiler warnings
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 13:36:41 +0000 (14:36 +0100)]
gui: linux: fix some 'discards const qualifier' compiler warnings
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 13:35:32 +0000 (14:35 +0100)]
gui: linux: fix some 'noreturn' compiler warnings
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 13:34:47 +0000 (14:34 +0100)]
gui: linux: use toplevel make options
But disable some warnings for now.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 12:32:01 +0000 (13:32 +0100)]
gui: linux: fix some 'may be used uninitialized' compiler warnings
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 12:28:10 +0000 (13:28 +0100)]
gui: linux: add VERBOSE handling
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 12:26:42 +0000 (13:26 +0100)]
gui: linux: clean and install are phony targets
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 12:26:19 +0000 (13:26 +0100)]
gui: linux: minor Makefile fixup
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 12:25:39 +0000 (13:25 +0100)]
Makefile: always pass VERBOSE to the make command
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 11:32:54 +0000 (12:32 +0100)]
Makefile: add gui target
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 12:16:27 +0000 (13:16 +0100)]
Makefile: fixup some forgotten make command prefixes
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 7 Nov 2012 11:21:26 +0000 (12:21 +0100)]
win32: use #ifdef _WIN32
I'm really tired of seeing (windows) compiler errors in Eclipse
on my Linux machine...
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Mon, 5 Nov 2012 16:39:27 +0000 (17:39 +0100)]
Merge tag 'v0.6.4'
OLSRd release 0.6.4
* tag 'v0.6.4':
Update version to 0.6.4
Fix slightly insulting error message.
on os x we need to include the proper files in order to have IPv6_PKTINFO
pud: include nmealib v1.0.3
pud: force pending buffer out if not enough space for our message
Pud: Do not use the variable name strlen.
Ferry Huberts [Fri, 2 Nov 2012 15:11:49 +0000 (16:11 +0100)]
gateway: refactor olsr_set_inet_gateway
To make it easier to understand
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 2 Nov 2012 12:52:06 +0000 (13:52 +0100)]
hna_set: olsr_ip_prefix_to_string outputs a wider string
See
213f9e04ab44d89c0138b0283883eebe2aabc9a5
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 2 Nov 2012 11:47:51 +0000 (12:47 +0100)]
gateway: minor improvement in NULL comparisons
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 2 Nov 2012 11:49:32 +0000 (12:49 +0100)]
gateway: rename a variable
And add a comment
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 2 Nov 2012 10:20:55 +0000 (11:20 +0100)]
gateway: only remove a tunnel when there is one
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 13:17:01 +0000 (14:17 +0100)]
use INET_ADDRSTRLEN and INET6_ADDRSTRLEN instead of magic constants
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 12:22:28 +0000 (13:22 +0100)]
neighbor_table: stub out olsr_print_neighbor_table on #ifdef NODEBUG and fix
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 12:20:31 +0000 (13:20 +0100)]
neighbor_table: stub out olsr_print_neighbor_table on #ifndef NODEBUG
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 12:17:54 +0000 (13:17 +0100)]
hna_set: stub out olsr_print_hna_set on #ifdef NODEBUG and fix
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 11:52:52 +0000 (12:52 +0100)]
hna_set: stub out olsr_print_hna_set on #ifndef NODEBUG
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 11:55:40 +0000 (12:55 +0100)]
two_hop_neighbor_table: stub out olsr_print_two_hop_neighbor_table on #ifdef NODEBUG
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 11:54:58 +0000 (12:54 +0100)]
tc_set: stub out olsr_print_tc_table on #ifdef NODEBUG
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 11:54:34 +0000 (12:54 +0100)]
routing_table: stub out olsr_print_routing_table on #ifdef NODEBUG
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 11:53:37 +0000 (12:53 +0100)]
mpr_set: stub out olsr_print_mpr_set on #ifdef NODEBUG
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 11:53:10 +0000 (12:53 +0100)]
link_set: stub out olsr_print_link_set on #ifdef NODEBUG
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 11:52:30 +0000 (12:52 +0100)]
duplicate_set: stub out olsr_print_duplicate_table on #ifdef NODEBUG
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 11:51:59 +0000 (12:51 +0100)]
gateway: stub out olsr_print_gateway_entries on #ifdef NODEBUG
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 09:37:38 +0000 (10:37 +0100)]
gateway: add a define for the tunnel name
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 1 Nov 2012 09:28:00 +0000 (10:28 +0100)]
gateway: rename gw_mem_cookie to gateway_entry_mem_cookie
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 30 Oct 2012 16:14:44 +0000 (17:14 +0100)]
gateway: improve cleanup
First remove all inactive gateways from the gateway tree
to avoid getting a gateway re-election. Then remove the active
gateways.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Henning Rogge [Tue, 30 Oct 2012 19:07:35 +0000 (20:07 +0100)]
Update version to 0.6.4
Ferry Huberts [Tue, 30 Oct 2012 11:32:18 +0000 (12:32 +0100)]
gateway: minor optimisation
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Henning Rogge [Mon, 29 Oct 2012 13:37:37 +0000 (14:37 +0100)]
Remove dead codepath
CID 739641: Logically dead code (DEADCODE)
Execution cannot reach this expression "NULL" inside statement "err = olsr_new_netlink_rout...".
Henning Rogge [Mon, 29 Oct 2012 13:34:20 +0000 (14:34 +0100)]
reset link timer if not set
CID 739651: Dereference after null check (FORWARD_NULL)
At (6): Passing "entry" to function "olsr_process_hysteresis(struct link_entry *)", which dereferences null "entry->link_timer"
Henning Rogge [Mon, 29 Oct 2012 13:31:01 +0000 (14:31 +0100)]
no hostroute possible in this if() branch
CID 739641: Logically dead code (DEADCODE)
Execution cannot reach this expression "NULL" inside statement "err = olsr_new_netlink_rout...".
Henning Rogge [Mon, 29 Oct 2012 13:03:35 +0000 (14:03 +0100)]
Interface will always be found.
CID 739650: Dereference after null check (FORWARD_NULL)
At (10): Dereferencing null pointer "cfg_inter".
Henning Rogge [Mon, 29 Oct 2012 13:01:33 +0000 (14:01 +0100)]
Declare olsr_exit() as noreturn
CID 739654: Dereference after null check (FORWARD_NULL)
At (7): Dereferencing null pointer "node".
Henning Rogge [Mon, 29 Oct 2012 12:58:35 +0000 (13:58 +0100)]
fail of non-blocking netlink socket is not fatal
CID 739623: Unchecked return value (CHECKED_RETURN)
At (24): Calling function "fcntl(olsr_cnf->rtnl_s, 4, 2048)" without checking return value. This library function may fail and return an error code.
Henning Rogge [Mon, 29 Oct 2012 12:56:27 +0000 (13:56 +0100)]
Fail in IPC initializationis always fatal.
CID 739624 (#1 of 1): Unchecked return value (CHECKED_RETURN)
At (34): Calling function "ipc_init()" without checking return value. It wraps a library function that may fail and return an error code.
Henning Rogge [Mon, 29 Oct 2012 12:44:37 +0000 (13:44 +0100)]
Fix command line parsing macro
CID 739642: Logically dead code (DEADCODE)
Execution cannot reach this statement "fprintf(stderr, "Error pars...".
Ferry Huberts [Fri, 26 Oct 2012 14:50:46 +0000 (16:50 +0200)]
httpinfo: add a comment about why the client socket is not closed
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 26 Oct 2012 14:38:16 +0000 (16:38 +0200)]
Revert "httpdinfo: fix resource leak"
This reverts commit
808928830ed65a3d8de80876d00ad78a8cfe540b.
It breaks the httpinfo page serving
Ferry Huberts [Fri, 26 Oct 2012 13:15:03 +0000 (15:15 +0200)]
cookie: add an assert
Coverity doesn't understand the olsr_exit
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 26 Oct 2012 12:50:44 +0000 (14:50 +0200)]
cookie: an array already is a pointer
Coverity:
CID 739655 (#1 of 1): Dereference after null check (FORWARD_NULL)
At (8): Passing null pointer "&branding->cmb_sig" to function
"memcpy(void * restrict, void const * restrict, size_t)", which
dereferences it.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 26 Oct 2012 11:28:16 +0000 (13:28 +0200)]
Merge branch 'lua-official-502'
* lua-official-502:
tas: lua: run gnu-indent.sh script
use the POSIX standard '__linux__' macro instead of 'linux'
Patch ALIGN_NOWARN_ARM macro for better priority handling.
ARM alignment warnings fixed
Fix sytax errs and line break quirks for gnu-indent
* added -Wcast-qual: this killed lots of unnecessary type-casts
* added -Wbad-function-cast
cleanup, 1. step (to get some local changes away):
x86_64 patch from Bernd
tas: lua: official source code for 5.0.2
Ferry Huberts [Fri, 26 Oct 2012 11:27:29 +0000 (13:27 +0200)]
tas: lua: sync up to official source code with fixes
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 26 Oct 2012 11:15:36 +0000 (13:15 +0200)]
tas: lua: run gnu-indent.sh script
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Fri, 26 Oct 2012 08:38:04 +0000 (10:38 +0200)]
use the POSIX standard '__linux__' macro instead of 'linux'
"Use __linux__ for this purpose, not linux. Although the latter is defined, it is not POSIX compliant."
http://www.faqs.org/docs/Linux-HOWTO/GCC-HOWTO.html#INDEX.25
from:
485c4d5ca8ad403b27afd39d3016f9741f28867a
Ferry Huberts [Fri, 26 Oct 2012 08:27:50 +0000 (10:27 +0200)]
Patch ALIGN_NOWARN_ARM macro for better priority handling.
from:
7fce805df297d920e5c65e537f610fa7da75bab5
Ferry Huberts [Fri, 26 Oct 2012 08:25:52 +0000 (10:25 +0200)]
Ferry Huberts [Fri, 26 Oct 2012 10:43:15 +0000 (12:43 +0200)]
Fix sytax errs and line break quirks for gnu-indent
from:
0e3c43820a333bea7863e08208de22d77dc828aa
corrected gnu-indent quirks
from:
29d2799ba478fc0354596ff132128e873454bb20
Ferry Huberts [Fri, 26 Oct 2012 10:42:21 +0000 (12:42 +0200)]
* added -Wcast-qual: this killed lots of unnecessary type-casts
from:
17271941ffaa174ee45959effee041831b489d00
Bernd Petrovitsch [Fri, 16 Nov 2007 19:34:26 +0000 (19:34 +0000)]
Ferry Huberts [Fri, 26 Oct 2012 11:06:40 +0000 (13:06 +0200)]
cleanup, 1. step (to get some local changes away):
from:
6ff6c1cc6464a9ca6ac1d3961fc044960a402e5b
Ferry Huberts [Fri, 26 Oct 2012 10:40:36 +0000 (12:40 +0200)]
tas: lua: run gnu-indent.sh script
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Andreas Tonnesen [Sat, 19 Nov 2005 08:39:26 +0000 (08:39 +0000)]
Ferry Huberts [Fri, 26 Oct 2012 10:35:23 +0000 (12:35 +0200)]
tas: lua: official source code for 5.0.2
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 24 Oct 2012 13:22:18 +0000 (15:22 +0200)]
defs: fix strscpy null pointer dereference
Coverity:
CID 739649 (#1 of 1): Dereference after null check (FORWARD_NULL)
At (5): Passing null pointer "dest" to function
"strncpy(char * restrict, char const * restrict, size_t)", which
dereferences it.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 24 Oct 2012 13:07:34 +0000 (15:07 +0200)]
linux: sanitise ACPI battery data
Coverity:
CID 739695 (#1 of 1): Use of untrusted scalar value (TAINTED_SCALAR)
At (23): Using tainted variable "bat_max" as the divisor in
"bat_val * 100 / bat_max".
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 18 Oct 2012 09:44:27 +0000 (11:44 +0200)]
gateway: walk the gateway tree to properly cleanup
No need to explicitly remove the tunnels, since these are
removed by the olsr_delete_gateway_entry function.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 18 Oct 2012 09:14:36 +0000 (11:14 +0200)]
gateway: split olsr_delete_gateway_entry
The olsr_delete_gateway_entry function now is a wrapper around
the olsr_delete_gateway_tree_entry function. The latter function
will be used by the cleanup function later on, to prevent needless
iterations on the gateway tree.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 18 Oct 2012 09:09:02 +0000 (11:09 +0200)]
gateway: allow immediate removal of a gateway entry
This is going to be used by the cleanup function later on.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 18 Oct 2012 08:57:13 +0000 (10:57 +0200)]
gateway: minor simplification in olsr_delete_gateway_entry
Do an early return if the gw is NULL
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 18 Oct 2012 09:40:12 +0000 (11:40 +0200)]
gateway: ensure cleanup uses the reverse order of init
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 18 Oct 2012 09:18:08 +0000 (11:18 +0200)]
gateway: cleanup: free the allocated memory cookie
This was forgotten
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Thu, 18 Oct 2012 09:16:54 +0000 (11:16 +0200)]
gateway: initialise the handler before setting up the tunnel
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Wed, 24 Oct 2012 08:51:43 +0000 (10:51 +0200)]
pud: fix alignment warning
src/netTools.c: In function 'getIPv4Address':
src/netTools.c:102:11: warning: cast increases required alignment of target type [-Wcast-align]
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 14:11:42 +0000 (16:11 +0200)]
android: fix type punning warning
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 12:45:29 +0000 (14:45 +0200)]
lq: make sure last_ip != NULL
Coverity:
CID 739653 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
At (11): Passing null pointer "last_ip" to function
"calculate_border_flag(void *, void *)", which dereferences it.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 12:42:32 +0000 (14:42 +0200)]
lq: make sure that info_head != NULL
Coverity:
CID 739652 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
At (88): Dereferencing null pointer "info_head".
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 12:14:44 +0000 (14:14 +0200)]
olsr_switch: fix a memory leak
Coverity:
CID 739687 (#1 of 1): Resource leak (RESOURCE_LEAK)
At (16): Variable "oc" going out of scope leaks the storage it points to.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 12:12:33 +0000 (14:12 +0200)]
linux: apm: fix retry opening of apm proc file
Coverity:
CID 739684 (#1 of 1): Resource leak (RESOURCE_LEAK)
At (6): Variable "apm_procfile" going out of scope leaks the storage it
points to.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 12:38:22 +0000 (14:38 +0200)]
cfgparser: fix dereference before assert
Coverity:
CID 739688 (#1 of 1): Dereference before null check (REVERSE_INULL)
Null-checking "in->cnf" suggests that it may be null, but it has already
been dereferenced on all paths leading to the check.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 12:06:55 +0000 (14:06 +0200)]
cfgparser: fix a copy/paste error and resulting memory leak
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 12:06:12 +0000 (14:06 +0200)]
cfgparser: fix some memory leaks
Coverity:
CID 739682 (#1 of 2): Resource leak (RESOURCE_LEAK)
At (84): Variable "in" going out of scope leaks the storage it points to.
CID 739682 (#2 of 2): Resource leak (RESOURCE_LEAK)
At (89): Variable "in" going out of scope leaks the storage it points to.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 11:52:10 +0000 (13:52 +0200)]
main: fix an Out-of-bounds access
Coverity:
CID 739670 (#1 of 1): Out-of-bounds access (OVERRUN)
At (46): Overrunning struct type in_addr of 4 bytes by passing it to a
function which accesses it at byte offset 15 using argument
"16UL".
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 09:31:31 +0000 (11:31 +0200)]
txtinfo: remove some dead code
Coverity:
CID 739639 (#1 of 1): Logically dead code (DEADCODE)
Execution cannot reach this expression "97" inside statement
"v4 = (autoV4 ? 97 : 115);".
CID 739640 (#1 of 1): Logically dead code (DEADCODE)
Execution cannot reach this expression "97" inside statement
"v6 = (autoV6 ? 97 : 115);".
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 08:35:00 +0000 (10:35 +0200)]
tas: fix a memory leak
Coverity:
CID 739681 (#1 of 1): Resource leak (RESOURCE_LEAK)
At (21): Variable "walker" going out of scope leaks the storage it points to.
At (22): Variable "mess" going out of scope leaks the storage it points to.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 11:32:51 +0000 (13:32 +0200)]
quagga: explicitly ignore return value of fcntl
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 09:03:03 +0000 (11:03 +0200)]
pud: remove some dead code
Coverity:
CID 739635 (#1 of 1): Logically dead code (DEADCODE)
Execution cannot reach this expression ""disable"" inside statement
"pudError(true, "Could not %...".
CID 739636: Logically dead code (DEADCODE)
Execution cannot reach this expression ""enable"" inside statement
"pudError(true, "Could not %...".
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 11:03:07 +0000 (13:03 +0200)]
bmf: do not close an fd that is not open
CID 739656 (#1 of 4): Argument cannot be negative (NEGATIVE_RETURNS)
At (7): "encapsulatingSkfd" is passed to a parameter that cannot be
negative.
CID 739656 (#2 of 4): Argument cannot be negative (NEGATIVE_RETURNS)
At (9): "encapsulatingSkfd" is passed to a parameter that cannot be
negative.
CID 739656 (#3 of 4): Argument cannot be negative (NEGATIVE_RETURNS)
At (12): "capturingSkfd" is passed to a parameter that cannot be
negative.
CID 739656 (#4 of 4): Argument cannot be negative (NEGATIVE_RETURNS)
At (11): "encapsulatingSkfd" is passed to a parameter that cannot be
negative.
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Ferry Huberts [Tue, 23 Oct 2012 11:14:31 +0000 (13:14 +0200)]
p2pd: remove some dead code
Coverity:
CID 739634 (#1 of 1): Dead default in switch (DEADCODE)
Execution cannot reach this statement "default:".
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>