Skip to content

Commit

Permalink
VSEARCH 1.4.5: Fix memory allocation bug when reading long FASTA sequ…
Browse files Browse the repository at this point in the history
…ences
  • Loading branch information
torognes committed Oct 6, 2015
1 parent 870fa01 commit 21c8e04
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ In the example below, VSEARCH will identify sequences in the file database.fsa t

**Source distribution** To download the source distribution from a [release](https://github.com/torognes/vsearch/releases) and build the executable and the documentation using Autotools, use the following commands:
```
wget https://github.com/torognes/vsearch/archive/v1.4.4.tar.gz
tar xzf v1.4.4.tar.gz
cd vsearch-1.4.4
wget https://github.com/torognes/vsearch/archive/v1.4.5.tar.gz
tar xzf v1.4.5.tar.gz
cd vsearch-1.4.5
./autogen.sh
./configure
make
Expand All @@ -61,18 +61,18 @@ make install # as root or sudo make install
**Binary distribution** Starting with version 1.4.0, binary distribution files (.tar.gz) for GNU/Linux on x86-64 and Apple Mac OS X on x86-64 containing pre-compiled binaries as well as the documentation (man and pdf files) will be made available as part of each [release](https://github.com/torognes/vsearch/releases). The included executables include support for input files compressed by zlib and bzip2 (with files usually ending in `.gz` or `.bz2`). Download the appropriate executable for your system using the following commands if you are using a Linux system:

```sh
wget https://github.com/torognes/vsearch/releases/download/v1.4.4/vsearch-1.4.4-linux-x86_64.tar.gz
tar xzf vsearch-1.4.4-linux-x86_64.tar.gz
wget https://github.com/torognes/vsearch/releases/download/v1.4.5/vsearch-1.4.5-linux-x86_64.tar.gz
tar xzf vsearch-1.4.5-linux-x86_64.tar.gz
```

Or these commands if you are using a Mac:

```sh
wget https://github.com/torognes/vsearch/releases/download/v1.4.4/vsearch-1.4.4-osx-x86_64.tar.gz
tar xzf vsearch-1.4.4-osx-x86_64.tar.gz
wget https://github.com/torognes/vsearch/releases/download/v1.4.5/vsearch-1.4.5-osx-x86_64.tar.gz
tar xzf vsearch-1.4.5-osx-x86_64.tar.gz
```

You will now have the binary distribution in a folder called something like `vsearch-1.4.4-linux-x86_64` in which you will find three subfolders `bin`, `man` and `doc`. We recommend making a copy or a symbolic link to the vsearch binary `bin/vsearch` in a folder included in your `$PATH`, and a copy or a symbolic link to the vsearch man page `man/vsearch.1` in a folder included in your `$MANPATH`. The PDF version of the manual is available in `doc/vsearch_manual.pdf`.
You will now have the binary distribution in a folder called something like `vsearch-1.4.5-linux-x86_64` in which you will find three subfolders `bin`, `man` and `doc`. We recommend making a copy or a symbolic link to the vsearch binary `bin/vsearch` in a folder included in your `$PATH`, and a copy or a symbolic link to the vsearch man page `man/vsearch.1` in a folder included in your `$MANPATH`. The PDF version of the manual is available in `doc/vsearch_manual.pdf`.


**Binaries** Older VSEARCH binaries (until version 1.1.3) are available [here](https://github.com/torognes/vsearch/releases) for [GNU/Linux on x86-64 systems](https://github.com/torognes/vsearch/blob/master/bin/vsearch-1.1.3-linux-x86_64) and [Apple Mac OS X on x86-64 systems](https://github.com/torognes/vsearch/blob/master/bin/vsearch-1.1.3-osx-x86_64). These executables include support for input files compressed by zlib and bzip2 (with files usually ending in `.gz` or `.bz2`). Download the appropriate executable and make a symbolic link to the vsearch binary in a folder included in your `$PATH`. You may use the following commands, assuming `~/bin` is in your `$PATH` (substitute `linux` with `osx` in those lines if you're on a Mac):
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([vsearch], [1.4.4], [[email protected]])
AC_INIT([vsearch], [1.4.5], [[email protected]])
AM_INIT_AUTOMAKE([subdir-objects])
AC_LANG([C++])
AC_CONFIG_SRCDIR([src/vsearch.cc])
Expand Down
5 changes: 4 additions & 1 deletion man/vsearch.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" ============================================================================
.TH vsearch 1 "October 3, 2015" "version 1.4.3" "USER COMMANDS"
.TH vsearch 1 "October 6, 2015" "version 1.4.5" "USER COMMANDS"
.\" ============================================================================
.SH NAME
vsearch \(em chimera detection, clustering, dereplication, FASTA/FASTQ file processing, masking, pairwise alignment, searching, shuffling, sorting and subsampling of amplicons from metagenomic projects.
Expand Down Expand Up @@ -2013,6 +2013,9 @@ OS X.
.TP
.BR v1.4.4\~ "released October 3rd, 2015"
Remove debug message.
.TP
.BR v1.4.5\~ "released October 6rd, 2015"
Fix memory allocation bug when reading long FASTA sequences.
.RE
.LP
.\" ============================================================================
Expand Down
4 changes: 2 additions & 2 deletions src/fasta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ void buffer_extend(struct fasta_buffer_s * buffer, char * buf, unsigned long len
/* alloc space for len more characters + terminating zero,
but round up to nearest block size */
buffer->alloc =
(FASTA_BUFFER_ALLOC *
((buffer->length + len) / FASTA_BUFFER_ALLOC) + 1);
FASTA_BUFFER_ALLOC *
(((buffer->length + len) / FASTA_BUFFER_ALLOC) + 1);
buffer->data = (char*) xrealloc(buffer->data, buffer->alloc);
}

Expand Down

0 comments on commit 21c8e04

Please sign in to comment.