changeset 6:910e059abd6d

rcg.c: fix bug with realloc()
author paulo@twcdns.fastsearch.net
date Tue, 06 Apr 2010 22:51:22 -0700
parents 26e28ec5fe87
children 0b9cf47655fe
files rcg.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/rcg.c	Tue Apr 06 01:25:30 2010 -0700
     1.2 +++ b/rcg.c	Tue Apr 06 22:51:22 2010 -0700
     1.3 @@ -88,7 +88,7 @@
     1.4  		int so = -1;
     1.5  		int eo = -1;
     1.6  
     1.7 -		size_t out_len = strlen(buf);
     1.8 +		size_t out_len = strlen(buf) + 1;
     1.9  		char *out = calloc(out_len, sizeof(char));
    1.10  		unsigned int out_pos = 0;
    1.11  		unsigned int buf_pos = 0;