twister

HTTP fault injector for testing
Log | Files | Refs | README | LICENSE

commit ed39c0deb6fd8f3e779486863c1c8bda5c22fce7
parent 0506a80bdc307e3ff26335462918621fe6bdc163
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Fri, 15 Feb 2019 15:38:15 +0100

Fixing invalid reads.

Diffstat:
Msrc/twister/taler-twister-service.c | 21+++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/twister/taler-twister-service.c b/src/twister/taler-twister-service.c @@ -1389,7 +1389,8 @@ create_response (void *cls, if ('\0' != flip_path_ul[0]) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Going to flip the upload object (%s)\n", + "Going to flip the upload object (%.*s)\n", + hr->io_len, hr->io_buf); hr->json = json_loadb (hr->io_buf, @@ -1406,7 +1407,8 @@ create_response (void *cls, JSON_COMPACT); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Flipped (?) upload object (%s)\n", + "Flipped (?) upload object (%.*s)\n", + hr->io_len, hr->io_buf); json_decref (hr->json); } @@ -1414,7 +1416,8 @@ create_response (void *cls, if ('\0' != modify_path_ul[0]) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Going to modify the upload object (%s)\n", + "Going to modify the upload object (%.*s)\n", + hr->io_len, hr->io_buf); hr->json = json_loads (hr->io_buf, @@ -1430,7 +1433,8 @@ create_response (void *cls, JSON_COMPACT); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Modified (?) upload object (%s)\n", + "Modified (?) upload object (%.*s)\n", + hr->io_len, hr->io_buf); json_decref (hr->json); } @@ -1478,9 +1482,9 @@ create_response (void *cls, char *curlurl; GNUNET_asprintf (&curlurl, - "%s%s", - target_server_base_url, - hr->url); + "%s%s", + target_server_base_url, + hr->url); curl_easy_setopt (hr->curl, CURLOPT_URL, curlurl); @@ -1709,7 +1713,8 @@ create_response (void *cls, GNUNET_free (hr->io_buf); hr->io_buf = json_dumps (hr->json, JSON_COMPACT); hr->io_len = strlen (hr->io_buf); - TALER_LOG_DEBUG ("%s\n", + TALER_LOG_DEBUG ("%.*s\n", + hr->io_len, hr->io_buf); json_decref (hr->json); }