aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-02-23 21:26:11 +0000
committerChristian Grothoff <christian@grothoff.org>2014-02-23 21:26:11 +0000
commit7cc86b1c86d4ba017ce1ebb84125dc6e327abb49 (patch)
tree550846d16a4ca13e6adbc77cba4dc7266865ae2b /src/util
parent282e6277c6aff384c1c15bc00828fdf4b9c46829 (diff)
downloadgnunet-7cc86b1c86d4ba017ce1ebb84125dc6e327abb49.tar.gz
gnunet-7cc86b1c86d4ba017ce1ebb84125dc6e327abb49.zip
-check for NULL fd
Diffstat (limited to 'src/util')
-rw-r--r--src/util/disk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/disk.c b/src/util/disk.c
index aac730eec..b7ff4c3f4 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -2635,12 +2635,14 @@ GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p,
2635 * @param fh GNUnet file descriptor 2635 * @param fh GNUnet file descriptor
2636 * @param dst destination buffer 2636 * @param dst destination buffer
2637 * @param dst_len length of dst 2637 * @param dst_len length of dst
2638 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise 2638 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
2639 */ 2639 */
2640int 2640int
2641GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh, 2641GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh,
2642 void *dst, size_t dst_len) 2642 void *dst, size_t dst_len)
2643{ 2643{
2644 if (NULL == fh)
2645 return GNUNET_SYSERR;
2644#ifdef MINGW 2646#ifdef MINGW
2645 if (dst_len < sizeof (HANDLE)) 2647 if (dst_len < sizeof (HANDLE))
2646 return GNUNET_SYSERR; 2648 return GNUNET_SYSERR;