From 2caaa2cae5c05e48274886c2968475f24d979c99 Mon Sep 17 00:00:00 2001 From: Lalit Shankar Chowdhury Date: Fri, 27 Sep 2024 21:04:46 +0530 Subject: [PATCH] Vorbis: Remove redundant bounds check --- modules/vorbis/resource_importer_ogg_vorbis.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vorbis/resource_importer_ogg_vorbis.cpp b/modules/vorbis/resource_importer_ogg_vorbis.cpp index 7b8d14741b0..729a6f55615 100644 --- a/modules/vorbis/resource_importer_ogg_vorbis.cpp +++ b/modules/vorbis/resource_importer_ogg_vorbis.cpp @@ -155,7 +155,6 @@ Ref ResourceImporterOggVorbis::load_from_buffer(const Vect char *sync_buf = ogg_sync_buffer(&sync_state, OGG_SYNC_BUFFER_SIZE); err = ogg_sync_check(&sync_state); ERR_FAIL_COND_V_MSG(err != 0, Ref(), "Ogg sync error " + itos(err)); - ERR_FAIL_COND_V(cursor > size_t(file_data.size()), Ref()); size_t copy_size = file_data.size() - cursor; if (copy_size > OGG_SYNC_BUFFER_SIZE) { copy_size = OGG_SYNC_BUFFER_SIZE;