summary refs log tree commit diff
path: root/pkgs/development/libraries/libchop/0002-block-indexer-hash-Fix-off-by-n-in-ASCII-deserializa.patch
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-11-16 14:43:04 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-11-16 14:43:04 +0000
commit1ff3207641c6d1586c3f2754c8d3f5221240695d (patch)
tree74ccdd1a615f84adaef270a1c72d483ca2de833c /pkgs/development/libraries/libchop/0002-block-indexer-hash-Fix-off-by-n-in-ASCII-deserializa.patch
parent692efb76e43abeb8a8a6246118a49fde760bda08 (diff)
downloadnixlib-1ff3207641c6d1586c3f2754c8d3f5221240695d.tar
nixlib-1ff3207641c6d1586c3f2754c8d3f5221240695d.tar.gz
nixlib-1ff3207641c6d1586c3f2754c8d3f5221240695d.tar.bz2
nixlib-1ff3207641c6d1586c3f2754c8d3f5221240695d.tar.lz
nixlib-1ff3207641c6d1586c3f2754c8d3f5221240695d.tar.xz
nixlib-1ff3207641c6d1586c3f2754c8d3f5221240695d.tar.zst
nixlib-1ff3207641c6d1586c3f2754c8d3f5221240695d.zip
Updating libchop to 0.5.1
svn path=/nixpkgs/trunk/; revision=30444
Diffstat (limited to 'pkgs/development/libraries/libchop/0002-block-indexer-hash-Fix-off-by-n-in-ASCII-deserializa.patch')
-rw-r--r--pkgs/development/libraries/libchop/0002-block-indexer-hash-Fix-off-by-n-in-ASCII-deserializa.patch47
1 files changed, 0 insertions, 47 deletions
diff --git a/pkgs/development/libraries/libchop/0002-block-indexer-hash-Fix-off-by-n-in-ASCII-deserializa.patch b/pkgs/development/libraries/libchop/0002-block-indexer-hash-Fix-off-by-n-in-ASCII-deserializa.patch
deleted file mode 100644
index 4013f714880c..000000000000
--- a/pkgs/development/libraries/libchop/0002-block-indexer-hash-Fix-off-by-n-in-ASCII-deserializa.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 8b2d0b3792e4c0535ff7241cf3770232618cdefc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
-Date: Mon, 14 Nov 2011 17:34:10 +0100
-Subject: [PATCH 2/2] block-indexer-hash: Fix off-by-n in ASCII
- deserialization of the block indexer.
-
-* src/block-indexer-hash.c (hbi_deserialize): Don't read beyond SIZE.
-
-* tests/interfaces/deserialize.c (ascii_serials): Add a
-  `hash_block_indexer' example.
----
- src/block-indexer-hash.c       |    2 +-
- tests/interfaces/deserialize.c |    5 +++++
- 2 files changed, 6 insertions(+), 1 deletions(-)
-
-diff --git a/src/block-indexer-hash.c b/src/block-indexer-hash.c
-index 858ddd7..db7d6b4 100644
---- a/src/block-indexer-hash.c
-+++ b/src/block-indexer-hash.c
-@@ -638,7 +638,7 @@ hbi_deserialize (const char *buffer, size_t size, chop_serial_method_t method,
- 	  size_t name_len = 0;
- 	  const char *end = buffer;
- 
--	  while (isalnum (*end))
-+	  while (isalnum (*end) && end - buffer < size)
- 	    {
- 	      if (name_len >= sizeof (name))
- 		return CHOP_DESERIAL_CORRUPT_INPUT;
-diff --git a/tests/interfaces/deserialize.c b/tests/interfaces/deserialize.c
-index 6e9b765..af7015e 100644
---- a/tests/interfaces/deserialize.c
-+++ b/tests/interfaces/deserialize.c
-@@ -44,6 +44,11 @@ static const struct pair ascii_serials[] =
-       "3q2hrigwtmsmvqi64cy2yw7szh66drvf/122",
-     },
- 
-+    {
-+      "hash_block_indexer",
-+      "SHA1"
-+    },
-+
-     { NULL, NULL }
-   };
- 
--- 
-1.7.6
-