summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2018-10-25 14:49:12 +0200
committerJulius Bünger <buenger@mytum.de>2018-10-29 18:05:48 +0100
commit978440fd8f5d44114fa538e75eed74c65ef4b957 (patch)
treea7590294f0c823ac735a5e7c971913e35f3783b2 /src
parent255670708e5dd65327dd85d8cfb9f74c674167bc (diff)
RPS utils: Use proper size for writing to file
Diffstat (limited to 'src')
-rw-r--r--src/rps/rps-test_util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rps/rps-test_util.h b/src/rps/rps-test_util.h
index 11093420e..a806f11cd 100644
--- a/src/rps/rps-test_util.h
+++ b/src/rps/rps-test_util.h
@@ -49,7 +49,7 @@ create_file (const char *name);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,\
"Failed to create tmp_buf\n");\
else\
- GNUNET_DISK_fn_write(file_name,tmp_buf, sizeof(tmp_buf),\
+ GNUNET_DISK_fn_write(file_name, tmp_buf, strnlen(tmp_buf, 512),\
GNUNET_DISK_PERM_USER_READ |\
GNUNET_DISK_PERM_USER_WRITE |\
GNUNET_DISK_PERM_GROUP_READ |\
@@ -64,7 +64,7 @@ create_file (const char *name);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,\
"Failed to create tmp_buf\n");\
else\
- GNUNET_DISK_fn_write(file_name,tmp_buf, len, \
+ GNUNET_DISK_fn_write(file_name, tmp_buf, strnlen(tmp_buf, len), \
GNUNET_DISK_PERM_USER_READ |\
GNUNET_DISK_PERM_USER_WRITE |\
GNUNET_DISK_PERM_GROUP_READ |\