]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
RPKI: Fix allocation of hostname when using an IPv6 address
authorVincent Bernat <vincent@bernat.ch>
Mon, 29 Jul 2019 13:42:30 +0000 (15:42 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Mon, 29 Jul 2019 13:42:30 +0000 (15:42 +0200)
proto/rpki/config.Y

index a88a29a1c00435a36543ff4346a0e50211e075e9..63c7105cd073462e6171c7b2bdaa29239b377e51 100644 (file)
@@ -97,7 +97,7 @@ rpki_cache_addr:
      rpki_check_unused_hostname();
      RPKI_CFG->ip = $1;
      /* Ensure hostname is filled */
-     char *hostname = cfg_allocz(sizeof(INET6_ADDRSTRLEN + 1));
+     char *hostname = cfg_allocz(INET6_ADDRSTRLEN + 1);
      bsnprintf(hostname, INET6_ADDRSTRLEN+1, "%I", RPKI_CFG->ip);
      RPKI_CFG->hostname = hostname;
    }