WordPress.org

Make WordPress Core

Opened 18 months ago

Closed 8 weeks ago

Last modified 30 hours ago

#44080 closed defect (bug) (fixed)

Unreachable dead code in ID3/module.audio-video.quicktime.php

Reported by: kikk Owned by:
Milestone: 5.3 Priority: normal
Severity: normal Version: 3.6
Component: External Libraries Keywords:
Focuses: Cc:
PR Number:

Description

There are two consecutive blocks for
case 'rmla' in QuicktimeParseAtom functions. The second will never be visited under any given condition.

			case 'rmla': // Reference Movie Language Atom
				$atom_structure['version']     = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw']   = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['language_id'] = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
				$atom_structure['language']    = $this->QuicktimeLanguageLookup($atom_structure['language_id']);
				if (empty($info['comments']['language']) || (!in_array($atom_structure['language'], $info['comments']['language']))) {
					$info['comments']['language'][] = $atom_structure['language'];
				}
				break;
			case 'rmla': // Reference Movie Language Atom
				$atom_structure['version']   = getid3_lib::BigEndian2Int(substr($atom_data,  0, 1));
				$atom_structure['flags_raw'] = getid3_lib::BigEndian2Int(substr($atom_data,  1, 3)); // hardcoded: 0x0000
				$atom_structure['track_id']  = getid3_lib::BigEndian2Int(substr($atom_data,  4, 2));
				break;

Here is a pointer to the issue ->

https://github.com/WordPress/wordpress-develop/blob/e72d50370273c2741329e1a102ec90b35cf1b492/src/wp-includes/ID3/module.audio-video.quicktime.php#L690

Attachments (1)

patch-44080.diff (1.6 KB) - added by kikk 18 months ago.
Patch

Download all attachments as: .zip

Change History (5)

@kikk
18 months ago

Patch

#1 @desrosj
18 months ago

  • Version changed from 4.9.5 to 3.6

Related #23673.

#2 @desrosj
8 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Hey @kikk!

Thanks for this ticket! getID3 is a library that is maintained externally over on GitHub. For future reference, any changes to the library need to be suggested there before being merged into WordPress Core.

However, [46112] updated the getID3 library to the latest and greatest version (currently 1.9.18). This version appears to have addressed the issue you described.

#3 @SergeyBiryukov
8 weeks ago

  • Component changed from General to External Libraries
  • Milestone set to 5.3

#4 @SergeyBiryukov
30 hours ago

  • Resolution changed from reported-upstream to fixed
Note: See TracTickets for help on using tickets.