Merge "Fix incorrect handling of snprintf return value."