properties.c: better handling for name and value sizes

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
Merge pull request #118 from rsalveti/property-fixes

properties.c: better handling for name and value sizes