summary refs log tree commit diff
path: root/gnu/packages/patches/swish-e-search.patch
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2016-05-18 01:02:02 -0500
committerEric Bavier <bavier@member.fsf.org>2016-09-09 00:45:14 -0500
commita2319d2c8f4507b48e40e13ab56dbcfae3b2c533 (patch)
tree870f3912ae682c959c1bb8902a198b7df2952e01 /gnu/packages/patches/swish-e-search.patch
parent1fa3e33604f859a760c6b7605ff2cd725b609c30 (diff)
downloadguix-a2319d2c8f4507b48e40e13ab56dbcfae3b2c533.tar.gz
gnu: Add Swish-e.
* gnu/packages/search.scm (swish-e): New variable.
* gnu/packages/patches/swish-e-search.patch,
gnu/packages/patches/swish-e-format-security.patch: New patches.
* gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches/swish-e-search.patch')
-rw-r--r--gnu/packages/patches/swish-e-search.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/patches/swish-e-search.patch b/gnu/packages/patches/swish-e-search.patch
new file mode 100644
index 0000000000..2a57a31a08
--- /dev/null
+++ b/gnu/packages/patches/swish-e-search.patch
@@ -0,0 +1,43 @@
+From http://swish-e.org/archive/2015-09/13295.html
+
+--- a/src/compress.c	
++++ a/src/compress.c	
+@@ -995,7 +995,7 @@ void    remove_worddata_longs(unsigned char *worddata,int *sz_worddata)
+             progerr("Internal error in remove_worddata_longs");
+ 
+         /* dst may be smaller than src. So move the data */
+-        memcpy(dst,src,data_len);
++        memmove(dst,src,data_len);
+ 
+         /* Increase pointers */
+         src += data_len;
+--- a/src/headers.c	
++++ a/src/headers.c	
+@@ -280,7 +280,7 @@ static SWISH_HEADER_VALUE fetch_single_header( IndexFILE *indexf, HEADER_MAP *he
+ 
+         case SWISH_NUMBER:
+         case SWISH_BOOL:
+-            value.number = *(unsigned long *) data_pointer;
++            value.number = *(unsigned int *) data_pointer;
+ 
+             /* $$$ Ugly hack alert! */
+             /* correct for removed files */
+--- a/src/swishspider	
++++ a/src/swishspider	
+@@ -27,6 +27,7 @@ use LWP::UserAgent;
+ use HTTP::Status;
+ use HTML::Parser 3.00;
+ use HTML::LinkExtor;
++use Encode;
+ 
+     if (scalar(@ARGV) != 2) {
+         print STDERR "Usage: $0 localpath url\n";
+@@ -94,7 +95,7 @@ use HTML::LinkExtor;
+     # Don't allow links above the base
+     $URI::ABS_REMOTE_LEADING_DOTS = 1;
+ 
+-    $p->parse( $$content_ref );
++    $p->parse( decode_utf8 $$content_ref );
+     close( LINKS );
+ 
+     exit;