[vlc-commits] [Git][videolan/vlc][master] 2 commits: codec: substext: fix integer shift overflow
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Jul 31 07:00:02 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
2894cc0b by Steve Lhomme at 2026-07-31T06:49:51+00:00
codec: substext: fix integer shift overflow
A boolean is converted to an int that is 32 bits (signed).
Fixes CID #1697188
- - - - -
0d757f2a by Steve Lhomme at 2026-07-31T06:49:51+00:00
codec: substext: allow one more region to check window flags
- - - - -
1 changed file:
- modules/codec/substext.h
Changes:
=====================================
modules/codec/substext.h
=====================================
@@ -25,6 +25,8 @@
#include <vlc_text_style.h>
#include <vlc_subpicture.h>
+#include <stdint.h>
+
typedef struct substext_updater_region_t substext_updater_region_t;
enum substext_updater_region_flags_e
@@ -104,9 +106,9 @@ static inline void SubpictureUpdaterSysRegionAdd(substext_updater_region_t *p_pr
static uint64_t GetScalingModesAsFlags(const substext_updater_region_t *r)
{
uint64_t in_window_flags = 0;
- for (int i=0; i<63 && r; i++)
+ for (int i=0; i<64 && r; i++)
{
- in_window_flags |= (!r->b_in_window) << i;
+ in_window_flags |= (r->b_in_window ? UINT64_C(0) : UINT64_C(1)) << i;
r = r->p_next;
}
return in_window_flags;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3989afb520ee52f30d9d93ba24ee7d99852eac6f...0d757f2aa5d05b225a3feb12eed3cae0779e7aee
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/3989afb520ee52f30d9d93ba24ee7d99852eac6f...0d757f2aa5d05b225a3feb12eed3cae0779e7aee
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