Commit aedd3945 authored by Mark Andrews's avatar Mark Andrews
Browse files

In build_querystring error of a replacement string is missing

parent ae39e702
Pipeline #65624 failed with stages
in 18 minutes and 39 seconds
......@@ -283,8 +283,11 @@ sdlzh_build_querystring(isc_mem_t *mctx, query_list_t *querylist) {
*/
if (tseg->direct) {
length += tseg->strlen;
} else { /* calculate string length for dynamic segments. */
} else if (*(char **)tseg->sql != NULL) {
/* calculate string length for dynamic segments. */
length += strlen(*(char **)tseg->sql);
} else {
return (NULL);
}
/* get the next segment */
tseg = ISC_LIST_NEXT(tseg, link);
......@@ -300,7 +303,7 @@ sdlzh_build_querystring(isc_mem_t *mctx, query_list_t *querylist) {
if (tseg->direct) {
/* query segments */
strcat(qs, tseg->sql);
} else {
} else if (*(char **)tseg->sql != NULL) {
/* dynamic segments */
strcat(qs, *(char **)tseg->sql);
}
......
......@@ -285,8 +285,11 @@ build_querystring(query_list_t *querylist) {
*/
if (tseg->direct) {
length += tseg->strlen;
} else { /* calculate string length for dynamic segments. */
} else if (*(char **)tseg->cmd != NULL) {
/* calculate string length for dynamic segments. */
length += strlen(*(char **)tseg->cmd);
} else {
return (NULL);
}
/* get the next segment */
tseg = DLZ_LIST_NEXT(tseg, link);
......@@ -304,7 +307,7 @@ build_querystring(query_list_t *querylist) {
if (tseg->direct) {
/* query segments */
strcat(qs, tseg->cmd);
} else {
} else if (*(char **)tseg->cmd != NULL) {
/* dynamic segments */
strcat(qs, *(char **)tseg->cmd);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment