__owur static inline int PACKET_strndup(const PACKET *pkt, char **data)
{
    OPENSSL_free(*data);

    /* This will succeed on an empty packet, unless pkt->curr == NULL. */
    *data = OPENSSL_strndup((const char*)pkt->curr, PACKET_remaining(pkt));
    return (*data != NULL);
}