Mercurial > audlegacy
changeset 2344:3196a09a03e5 trunk
[svn] - fix potential overflow on bigendian (<= is not proper for boundschecking -- duh)
author | nenolod |
---|---|
date | Mon, 15 Jan 2007 20:47:50 -0800 |
parents | 0df1a48b8fc4 |
children | 0fb47429ad7e |
files | ChangeLog src/audacious/input.c src/audacious/vfs_buffer.c |
diffstat | 3 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 15 19:28:19 2007 -0800 +++ b/ChangeLog Mon Jan 15 20:47:50 2007 -0800 @@ -1,3 +1,11 @@ +2007-01-16 03:28:19 +0000 William Pitcock <nenolod@sacredspiral.co.uk> + revision [3696] + - compare against the uri, not the VFSConstructor class the fd comes from + + trunk/src/audacious/input.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + + 2007-01-16 03:24:54 +0000 William Pitcock <nenolod@sacredspiral.co.uk> revision [3694] - use vfs_rewind() instead of vfs_fseek(fd, 0, seek_set) which was wrong
--- a/src/audacious/input.c Mon Jan 15 19:28:19 2007 -0800 +++ b/src/audacious/input.c Mon Jan 15 20:47:50 2007 -0800 @@ -419,7 +419,7 @@ gboolean use_ext_filter; filename_proxy = g_strdup(filename); - fd = vfs_fopen(filename, "rb"); + fd = vfs_buffered_file_new_from_uri(filename_proxy); ext = strrchr(filename_proxy, '.') + 1;
--- a/src/audacious/vfs_buffer.c Mon Jan 15 19:28:19 2007 -0800 +++ b/src/audacious/vfs_buffer.c Mon Jan 15 20:47:50 2007 -0800 @@ -55,7 +55,7 @@ handle = (VFSBuffer *) file->handle; - for (i = ptr; i - ptr <= nmemb * size && i - ptr <= handle->size; i++, handle->iter++) + for (i = ptr; i - ptr < nmemb * size && i - ptr <= handle->size; i++, handle->iter++) { *i = *handle->iter; read++; @@ -80,7 +80,7 @@ handle = (VFSBuffer *) file->handle; - for (i = ptr; (i - ptr) <= nmemb * size && (i - ptr) <= handle->size; i++, handle->iter++) + for (i = ptr; (i - ptr) < nmemb * size && (i - ptr) <= handle->size; i++, handle->iter++) { *handle->iter = *i; written++;