# HG changeset patch # User hansmi # Date 1169382508 28800 # Node ID e146debd139362163b0b96d16de262ba2667743e # Parent 440971af5fdad9a3e7a2cf1df8ae7314fc28369c [svn] Check for sz == 0 in vfs_buffered_file_new_from_uri(), return NULL if it's the case. diff -r 440971af5fda -r e146debd1393 ChangeLog --- a/ChangeLog Sun Jan 21 03:32:36 2007 -0800 +++ b/ChangeLog Sun Jan 21 04:28:28 2007 -0800 @@ -1,3 +1,11 @@ +2007-01-21 11:32:36 +0000 William Pitcock + revision [3766] + - touch .depend after blanking it out + + trunk/mk/objective.mk | 1 + + 1 file changed, 1 insertion(+) + + 2007-01-21 11:00:31 +0000 William Pitcock revision [3764] - remove .depend on make clean diff -r 440971af5fda -r e146debd1393 src/audacious/vfs_buffered_file.c --- a/src/audacious/vfs_buffered_file.c Sun Jan 21 03:32:36 2007 -0800 +++ b/src/audacious/vfs_buffered_file.c Sun Jan 21 04:28:28 2007 -0800 @@ -188,6 +188,15 @@ sz = vfs_fread(fd->mem, 1, 32768, fd->fd); + if (!sz) + { + g_free(fd->mem); + g_free(fd); + g_free(handle); + + return NULL; + } + fd->buffer = vfs_buffer_new(fd->mem, sz); handle->handle = fd;