diff options
Diffstat (limited to 'src/internal/slibtool_symlink_impl.c')
-rw-r--r-- | src/internal/slibtool_symlink_impl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/internal/slibtool_symlink_impl.c b/src/internal/slibtool_symlink_impl.c index 27f8171..19ec8ee 100644 --- a/src/internal/slibtool_symlink_impl.c +++ b/src/internal/slibtool_symlink_impl.c @@ -13,6 +13,7 @@ #include "slibtool_errinfo_impl.h" #include "slibtool_symlink_impl.h" #include "slibtool_readlink_impl.h" +#include "slibtool_snprintf_impl.h" #define SLBT_DEV_NULL_FLAGS (SLBT_DRIVER_ALL_STATIC \ | SLBT_DRIVER_DISABLE_SHARED \ @@ -70,13 +71,14 @@ int slbt_create_symlink( dotdot = fwrapper ? "../" : ""; /* atarget */ - if ((size_t)snprintf(atarget,sizeof(atarget),"%s%s", - dotdot,slash) >= sizeof(atarget)) + if (slbt_snprintf(atarget,sizeof(atarget), + "%s%s",dotdot,slash) < 0) return SLBT_BUFFER_ERROR(dctx); /* tmplnk */ - if ((size_t)snprintf(tmplnk,sizeof(tmplnk),"%s.symlink.tmp", - lnkname) >= sizeof(tmplnk)) + if (slbt_snprintf(tmplnk,sizeof(tmplnk), + "%s.symlink.tmp", + lnkname) <0) return SLBT_BUFFER_ERROR(dctx); /* placeholder? */ |