[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34829 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34829 - gnunet/src/fs |
Date: |
Wed, 7 Jan 2015 13:39:55 +0100 |
Author: grothoff
Date: 2015-01-07 13:39:55 +0100 (Wed, 07 Jan 2015)
New Revision: 34829
Modified:
gnunet/src/fs/fs_uri.c
Log:
-check once, and consistently
Modified: gnunet/src/fs/fs_uri.c
===================================================================
--- gnunet/src/fs/fs_uri.c 2015-01-06 23:50:59 UTC (rev 34828)
+++ gnunet/src/fs/fs_uri.c 2015-01-07 12:39:55 UTC (rev 34829)
@@ -272,7 +272,6 @@
char *dup;
int saw_quote;
- GNUNET_assert (NULL != s);
slen = strlen (s);
pos = strlen (GNUNET_FS_URI_KSK_PREFIX);
if ((slen <= pos) || (0 != strncmp (s, GNUNET_FS_URI_KSK_PREFIX, pos)))
@@ -363,7 +362,6 @@
size_t pos;
char *end;
- GNUNET_assert (s != NULL);
pos = strlen (GNUNET_FS_URI_SKS_PREFIX);
if ((strlen (s) <= pos) || (0 != strncmp (s, GNUNET_FS_URI_SKS_PREFIX, pos)))
return NULL; /* not an SKS URI */
@@ -408,9 +406,6 @@
char h1[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)];
char h2[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)];
- if (NULL == s)
- return NULL;
- GNUNET_assert (s != NULL);
slen = strlen (s);
pos = strlen (GNUNET_FS_URI_CHK_PREFIX);
if ((slen < pos + 2 * sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) + 1) ||
@@ -629,6 +624,13 @@
struct GNUNET_FS_Uri *ret;
char *msg;
+ if (NULL == uri)
+ {
+ GNUNET_break (0);
+ if (NULL != emsg)
+ *emsg = GNUNET_strdup (_("invalid argument"));
+ return NULL;
+ }
if (NULL == emsg)
emsg = &msg;
*emsg = NULL;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34829 - gnunet/src/fs,
gnunet <=