diff options
author | Julius Bünger <buenger@mytum.de> | 2018-10-25 14:49:12 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2018-10-29 18:05:48 +0100 |
commit | 978440fd8f5d44114fa538e75eed74c65ef4b957 (patch) | |
tree | a7590294f0c823ac735a5e7c971913e35f3783b2 | |
parent | 255670708e5dd65327dd85d8cfb9f74c674167bc (diff) | |
download | gnunet-978440fd8f5d44114fa538e75eed74c65ef4b957.tar.gz gnunet-978440fd8f5d44114fa538e75eed74c65ef4b957.zip |
RPS utils: Use proper size for writing to file
-rw-r--r-- | src/rps/rps-test_util.h | 4 |
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); | |||
49 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING,\ | 49 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING,\ |
50 | "Failed to create tmp_buf\n");\ | 50 | "Failed to create tmp_buf\n");\ |
51 | else\ | 51 | else\ |
52 | GNUNET_DISK_fn_write(file_name,tmp_buf, sizeof(tmp_buf),\ | 52 | GNUNET_DISK_fn_write(file_name, tmp_buf, strnlen(tmp_buf, 512),\ |
53 | GNUNET_DISK_PERM_USER_READ |\ | 53 | GNUNET_DISK_PERM_USER_READ |\ |
54 | GNUNET_DISK_PERM_USER_WRITE |\ | 54 | GNUNET_DISK_PERM_USER_WRITE |\ |
55 | GNUNET_DISK_PERM_GROUP_READ |\ | 55 | GNUNET_DISK_PERM_GROUP_READ |\ |
@@ -64,7 +64,7 @@ create_file (const char *name); | |||
64 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING,\ | 64 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING,\ |
65 | "Failed to create tmp_buf\n");\ | 65 | "Failed to create tmp_buf\n");\ |
66 | else\ | 66 | else\ |
67 | GNUNET_DISK_fn_write(file_name,tmp_buf, len, \ | 67 | GNUNET_DISK_fn_write(file_name, tmp_buf, strnlen(tmp_buf, len), \ |
68 | GNUNET_DISK_PERM_USER_READ |\ | 68 | GNUNET_DISK_PERM_USER_READ |\ |
69 | GNUNET_DISK_PERM_USER_WRITE |\ | 69 | GNUNET_DISK_PERM_USER_WRITE |\ |
70 | GNUNET_DISK_PERM_GROUP_READ |\ | 70 | GNUNET_DISK_PERM_GROUP_READ |\ |