[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29444 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29444 - gnunet/src/util |
Date: |
Fri, 20 Sep 2013 18:35:27 +0200 |
Author: grothoff
Date: 2013-09-20 18:35:27 +0200 (Fri, 20 Sep 2013)
New Revision: 29444
Modified:
gnunet/src/util/network.c
Log:
-fix shortening routine to deal with longer hashes
Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c 2013-09-20 16:34:23 UTC (rev 29443)
+++ gnunet/src/util/network.c 2013-09-20 16:35:27 UTC (rev 29444)
@@ -123,7 +123,7 @@
if (slen < upm)
return unixpath; /* no shortening required */
GNUNET_CRYPTO_hash (unixpath, slen, &sh);
- while (sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) +
+ while (16 +
strlen (unixpath) >= upm)
{
if (NULL == (end = strrchr (unixpath, '/')))
@@ -137,7 +137,7 @@
*end = '\0';
}
GNUNET_CRYPTO_hash_to_enc (&sh, &ae);
- strcat (unixpath, (char*) ae.encoding);
+ strncat (unixpath, (char*) ae.encoding, 16);
return unixpath;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29444 - gnunet/src/util,
gnunet <=