changeset 15:acf12a2e872d

rcg.c: use snprintf() instead of sprintf()
author paulo@thepaulopc
date Fri, 12 Nov 2010 00:13:48 -0800
parents 669266246c6b
children 74cf5cfa3ec1
files rcg.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/rcg.c	Fri Nov 12 00:08:34 2010 -0800
     1.2 +++ b/rcg.c	Fri Nov 12 00:13:48 2010 -0800
     1.3 @@ -218,7 +218,7 @@
     1.4  				if (!out)
     1.5  					exit(realloc_error());
     1.6  
     1.7 -				sprintf(&out[out_pos], "%.*s%s%s%s%.*s%s", so, &buf[buf_pos], CLR_START, clr, CLR_END, match_len, &buf[buf_pos + so], CLR_CLEAR);
     1.8 +				snprintf(&out[out_pos], out_len, "%.*s%s%s%s%.*s%s", so, &buf[buf_pos], CLR_START, clr, CLR_END, match_len, &buf[buf_pos + so], CLR_CLEAR);
     1.9  
    1.10  				buf_pos += match_len + so;
    1.11  				out_pos += CLR_STRING_len + match_len + so;