[PATCH 2/3] reg: Avoid allocating zero bytes of memory when handling REG_BINARY data