UB in rend_parse_v2_service_descriptor()

    version = (int) tor_parse_long(smartlist_get(versions, i),
                                   10, 0, INT_MAX, &num_ok, NULL);
    if (!num_ok) /* It's a string; let's ignore it. */
      continue;
    result->protocols |= 1 << version;

This is UB if 'version' is bigger than the size of integer of the platform.