From df85f8624c42436e97c1b62884e67b08a70af7f0 Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Tue, 17 Aug 2004 22:17:30 +0000 Subject: Stay within array bounds CVS patchset: 6891 CVS date: 2004/08/17 22:17:30 --- src/xine-engine/info_helper.c | 6 +++--- 1 file 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); -- cgit v1.2.3