[libdvdnav-devel] [Git][videolan/libdvdnav][master] 2 commits: play: avoid assert and exit and bogus PG link
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Mon Aug 11 12:07:02 UTC 2025
Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdnav
Commits:
7f446667 by Steve Lhomme at 2025-08-11T12:05:45+00:00
play: avoid assert and exit and bogus PG link
Just return LinkNoLink.
- - - - -
9962c05f by Steve Lhomme at 2025-08-11T12:05:45+00:00
play: avoid assert and exit and bogus Cell link
Just return LinkNoLink.
- - - - -
1 changed file:
- src/vm/play.c
Changes:
=====================================
src/vm/play.c
=====================================
@@ -177,7 +177,11 @@ link_t play_PG(vm_t *vm) {
Log3(vm, "play_PG: (vm->state).pgN (%i) > pgc->nr_of_programs (%i)",
(vm->state).pgN, (vm->state).pgc->nr_of_programs );
#endif
- assert((vm->state).pgN == (vm->state).pgc->nr_of_programs + 1);
+ if((vm->state).pgN > (vm->state).pgc->nr_of_programs + 1) {
+ /* bogus link, ignore it */
+ link_t link_values = { LinkNoLink, 0, 0, 0 };
+ return link_values;
+ }
return play_PGC_post(vm);
}
@@ -199,7 +203,11 @@ link_t play_Cell(vm_t *vm) {
Log3(vm, "(vm->state).cellN (%i) > pgc->nr_of_cells (%i)",
(vm->state).cellN, (vm->state).pgc->nr_of_cells );
#endif
- assert((vm->state).cellN == (vm->state).pgc->nr_of_cells + 1);
+ if((vm->state).cellN > (vm->state).pgc->nr_of_cells + 1) {
+ /* bogus link, ignore it */
+ link_t link_values = { LinkNoLink, 0, 0, 0 };
+ return link_values;
+ }
return play_PGC_post(vm);
}
View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/compare/1d2af48d685911a169fe77d500b1d426910c6f77...9962c05fe2646942997ecfdad58d1b60891a020e
--
View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/compare/1d2af48d685911a169fe77d500b1d426910c6f77...9962c05fe2646942997ecfdad58d1b60891a020e
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the libdvdnav-devel
mailing list