[PATCH 2/9] common/memsize.c: Fix get_effective_memsize() to check for overflow