[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/04: RPS utils: Use proper size for writing to f
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/04: RPS utils: Use proper size for writing to file |
Date: |
Mon, 29 Oct 2018 18:07:34 +0100 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a commit to branch master
in repository gnunet.
commit 978440fd8f5d44114fa538e75eed74c65ef4b957
Author: Julius Bünger <address@hidden>
AuthorDate: Thu Oct 25 14:49:12 2018 +0200
RPS utils: Use proper size for writing to file
---
src/rps/rps-test_util.h | 4 ++--
1 file 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 |\
--
To stop receiving notification emails like this one, please contact
address@hidden