[vlc-commits] commit: rar: fix possible use of un undefined value (due to a goto on error ). ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Sun Jul 4 08:22:41 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jul 4 08:22:14 2010 +0200| [c38d7ca2761d566e0c4e882f51aeb0cd2ac8d08f] | committer: Rémi Duraffort
rar: fix possible use of un undefined value (due to a goto on error).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c38d7ca2761d566e0c4e882f51aeb0cd2ac8d08f
---
modules/access/rar/rar.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/access/rar/rar.c b/modules/access/rar/rar.c
index b028f00..4079d81 100644
--- a/modules/access/rar/rar.c
+++ b/modules/access/rar/rar.c
@@ -189,13 +189,16 @@ static int SkipFile(stream_t *s, int *count, rar_file_t ***file, const rar_block
memcpy(name, &peek[name_offset], name_size);
}
+ rar_file_t *current = NULL;
if (method != 0x30) {
msg_Warn(s, "Ignoring compressed file %s (method=0x%2.2x)", name, method);
goto exit;
}
/* */
- rar_file_t *current = *count > 0 ? (*file)[*count - 1] : NULL;
+ if( *count > 0 )
+ current = (*file)[*count - 1];
+
if (current &&
(current->is_complete ||
current->size != file_size ||
More information about the vlc-commits
mailing list