The "modify" command allowed to replace an existing record, now
checks for the NULL string in the new value and throw error if
found.
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/655
Signed-off-by: Adam Julis <ajulis@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
goto cleanup;
}
+ if (!txt.value) {
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ _("missing value of modifying DNS TXT record in network %1$s"),
+ def->name);
+ goto cleanup;
+ }
+
VIR_FREE(dns->txts[foundIdx].value);
dns->txts[foundIdx].value = g_steal_pointer(&txt.value);