From de1edb142b4b0ba768db5e324819149df8695e5a Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 10 Mar 2024 05:08:44 +0000 Subject: slbt_exec_link_create_library(): dctx->cctx->release may be null. --- src/logic/linkcmd/slbt_linkcmd_dsolib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/logic/linkcmd/slbt_linkcmd_dsolib.c b/src/logic/linkcmd/slbt_linkcmd_dsolib.c index b740a00..13eaefb 100644 --- a/src/logic/linkcmd/slbt_linkcmd_dsolib.c +++ b/src/logic/linkcmd/slbt_linkcmd_dsolib.c @@ -172,10 +172,11 @@ slbt_hidden int slbt_exec_link_create_library( } else if (relfilename && dctx->cctx->verinfo.verinfo) { if (slbt_snprintf(soname,sizeof(soname), - "-Wl,%s%s-%s%s.%d%s", + "-Wl,%s%s%s%s%s.%d%s", ectx->sonameprefix, dctx->cctx->libname, - dctx->cctx->release, + dctx->cctx->release ? "-" : "", + dctx->cctx->release ? dctx->cctx->release : "", dctx->cctx->settings.osdsuffix, dctx->cctx->verinfo.major, dctx->cctx->settings.osdfussix) < 0) @@ -186,10 +187,11 @@ slbt_hidden int slbt_exec_link_create_library( } else if (relfilename) { if (slbt_snprintf(soname,sizeof(soname), - "-Wl,%s%s-%s%s", + "-Wl,%s%s%s%s%s", ectx->sonameprefix, dctx->cctx->libname, - dctx->cctx->release, + dctx->cctx->release ? "-" : "", + dctx->cctx->release ? dctx->cctx->release : "", dctx->cctx->settings.dsosuffix) < 0) return SLBT_BUFFER_ERROR(dctx); -- cgit v1.2.3