resolver: fix snprintf call
@@ -73,13 +73,13 @@ static void elektraGenTempFilename (ElektraResolved * handle, ElektraResolveTemp
{
tmpFilenameSize = strlen (handle->fullPath) + POSTFIX_SIZE;
tmpFile = elektraCalloc (tmpFilenameSize);
- len = snprintf (tmpFile, tmpFilenameSize - POSTFIX_SIZE, "%s", handle->fullPath);
+ len = snprintf (tmpFile, strlen (handle->fullPath) + 1, "%s", handle->fullPath);
}
else if (tmpDir == ELEKTRA_RESOLVER_TEMPFILE_TMPDIR)
{
tmpFilenameSize = sizeof ("/tmp/") + strlen (handle->fullPath) + POSTFIX_SIZE;
tmpFile = elektraCalloc (tmpFilenameSize);
- len = snprintf (tmpFile, tmpFilenameSize - POSTFIX_SIZE, "/tmp/%s", handle->fullPath);
+ len = snprintf (tmpFile, strlen (handle->fullPath) + 1, "/tmp/%s", handle->fullPath);
}
struct timeval tv;
