[LIBS] add strnlen and strlcat functions

strlcat is a safer strncat version and its implementation
requires strnlen.

strlcat will be used to fix a number of problem in Xvisor
source tree.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_fb.h: fix small bug in header.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_fbmon: remove useless code.

Problem notified by Coverity Scan

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_buddy: use strlcpy instead of strncpy.

This guaranty a trailing 0 a the end of string.

We also change the initial test to something more meaningfull.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_blockdev: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_fbmem.c: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_input.c: use strlcpy instead of strncpy.

We also replace vmm_malloc/memset with vmm_zalloc

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_net_bridge.c: don't use pointer before they are tested.

We were using a pointer before it was tested for NULL.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_netport.c: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_netswitch.c: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_rtcdev.c: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_cmdmgr.c: ret variable might be used uninitialized.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_chardev.c: use strlcpy instead of strncpy.

We also replace vmm_malloc/memset with vmm_zalloc

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_devtree.c: use strlcpy instead of strncpy.

We also test vmm_malloc return value.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_guest_aspace.c: test vmm_devtree_attrval return value

We also fix a bug where a pointer was set to NULL then used.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_host_irq.c: test vmm_malloc return value

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_main.c: use strlcpy instead of strncpy.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_manager.c: use strlcpy instead of strncpy.

Also refactor the error handling code.

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_params.c: refactor parse_args error handling

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
[CORE] vmm_profiler.c: replace vmm_malloc/memset with vmm_zalloc

Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>