Created
April 4, 2013 00:35
-
-
Save cxreg/5306732 to your computer and use it in GitHub Desktop.
Use a simple format string for JSON printing, thus not interpreting % as a conversion specifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/mod/applications/mod_commands/mod_commands.c | |
+++ b/src/mod/applications/mod_commands/mod_commands.c | |
@@ -4809,7 +4809,7 @@ SWITCH_STANDARD_API(show_function) | |
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n"); | |
holder.stream->write_function(holder.stream, "-ERR Memory Error!\n"); | |
} else { | |
- holder.stream->write_function(holder.stream, json_text); | |
+ holder.stream->write_function(holder.stream, "%s", json_text); | |
} | |
cJSON_Delete(result); | |
switch_safe_free(json_text); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment