diff options
author | midipix <writeonce@midipix.org> | 2024-03-10 05:08:44 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-10 05:15:51 +0000 |
commit | de1edb142b4b0ba768db5e324819149df8695e5a (patch) | |
tree | 5a87467d69f4a0153f6de9a31e7def304bbeca0c | |
parent | da73d2d1d4fd7cd8c3da869cf3986f41f0919864 (diff) | |
download | slibtool-de1edb142b4b0ba768db5e324819149df8695e5a.tar.bz2 slibtool-de1edb142b4b0ba768db5e324819149df8695e5a.tar.xz |
slbt_exec_link_create_library(): dctx->cctx->release may be null.
-rw-r--r-- | src/logic/linkcmd/slbt_linkcmd_dsolib.c | 10 |
1 files changed, 6 insertions, 4 deletions
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); |