Fix debugging messages callback.

The debug messages should contain EOL char.

Also check string lengths in internal logging macros.
This commit is contained in:
Milan Broz
2019-06-11 15:26:53 +02:00
parent df0faef9ca
commit 32258ee8ae
2 changed files with 6 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ void tool_log(int level, const char *msg, void *usrptr __attribute__((unused)))
case CRYPT_LOG_DEBUG_JSON:
case CRYPT_LOG_DEBUG:
if (opt_debug)
fprintf(stdout, "# %s\n", msg);
fprintf(stdout, "# %s", msg);
break;
}
}