diff options
author | James Stembridge <jstembridge@users.sourceforge.net> | 2004-08-17 22:17:30 +0000 |
---|---|---|
committer | James Stembridge <jstembridge@users.sourceforge.net> | 2004-08-17 22:17:30 +0000 |
commit | df85f8624c42436e97c1b62884e67b08a70af7f0 (patch) | |
tree | db787aa6e98b3b5bf995184ad43906c234cf8182 /src | |
parent | 0106f4648964412ed8c50fbc817ff3e5db5cebdb (diff) | |
download | xine-lib-df85f8624c42436e97c1b62884e67b08a70af7f0.tar.gz xine-lib-df85f8624c42436e97c1b62884e67b08a70af7f0.tar.bz2 |
Stay within array bounds
CVS patchset: 6891
CVS date: 2004/08/17 22:17:30
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/info_helper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xine-engine/info_helper.c b/src/xine-engine/info_helper.c index 5d4287d7c..0d1a2832d 100644 --- a/src/xine-engine/info_helper.c +++ b/src/xine-engine/info_helper.c @@ -20,7 +20,7 @@ * stream metainfo helper functions * hide some xine engine details from demuxers and reduce code duplication * - * $Id: info_helper.c,v 1.9 2003/12/14 00:33:36 f1rmb Exp $ + * $Id: info_helper.c,v 1.10 2004/08/17 22:17:30 jstembridge Exp $ */ #ifdef HAVE_CONFIG_H @@ -136,7 +136,7 @@ static void __chomp(char *str) { return; i = len - 1; - while (((unsigned char)str[i] <= 32) && (i >= 0)) { + while ((i >= 0) && ((unsigned char)str[i] <= 32)) { str[i] = 0; i--; } @@ -228,7 +228,7 @@ void _x_meta_info_n_set(xine_stream_t *stream, int info, const char *buf, int le char *str = xine_xmalloc(len + 1); snprintf(str, len + 1 , "%s", buf); - __meta_info_set_unlocked(stream, info, (const char *) &str[0]);
+ __meta_info_set_unlocked(stream, info, (const char *) &str[0]); free(str); } pthread_mutex_unlock(&stream->meta_mutex); |