[vlc-commits] [Git][videolan/vlc][master] frame: fix potential NULL dereference on Windows read error
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Jul 30 13:36:51 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
41c538c6 by Steve Lhomme at 2026-07-30T13:01:07+00:00
frame: fix potential NULL dereference on Windows read error
If ReadFile() fails frame is NULL. We could should not call vlc_frame_Release()
And there's an error so we should not to use the handle anymore.
- - - - -
1 changed file:
- src/misc/frame.c
Changes:
=====================================
src/misc/frame.c
=====================================
@@ -522,7 +522,7 @@ vlc_frame_t *vlc_frame_File(int fd, bool write)
vlc_testcancel();
i += len;
}
- if (unlikely(!SetFilePointerEx(handle, srcPointer, NULL, FILE_BEGIN)))
+ if (frame != NULL && unlikely(!SetFilePointerEx(handle, srcPointer, NULL, FILE_BEGIN)))
{
vlc_frame_Release (frame);
frame = NULL;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/41c538c685bf5b03dc3850b7852964fafd6120bd
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/41c538c685bf5b03dc3850b7852964fafd6120bd
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list