dog/vdi: fix memory leak in dog vdi command

Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
lib/logger: fix potential type conversion error

The return type of snprintf is int. If an output error is encountered,
a negative value is returned. Assigning a negative value to a variable
in type of size_t is danger. The result will be a huge positive number
and the error branch will never be reached.
To avoid it, change the type of variable 'len' to ssize_t. In Comparison,
convert it back to size_t.

Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>