mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
the server could crash if the version string was unassigned.
This commit is contained in:
@@ -652,8 +652,8 @@ create_version_view(dns_c_ctx_t *cctx, dns_zonemgr_t *zmgr, dns_view_t **viewp)
|
|||||||
r.length = sizeof(origindata);
|
r.length = sizeof(origindata);
|
||||||
dns_name_fromregion(&origin, &r);
|
dns_name_fromregion(&origin, &r);
|
||||||
|
|
||||||
(void) dns_c_ctx_getversion(cctx, &versiontext);
|
result = dns_c_ctx_getversion(cctx, &versiontext);
|
||||||
if (versiontext == NULL)
|
if (result != ISC_R_SUCCESS)
|
||||||
versiontext = ns_g_version;
|
versiontext = ns_g_version;
|
||||||
len = strlen(versiontext);
|
len = strlen(versiontext);
|
||||||
if (len > 255)
|
if (len > 255)
|
||||||
|
Reference in New Issue
Block a user