WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 6 weeks ago

#44080 new defect (bug)

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

Reported by: kikk Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.6
Component: General Keywords:
Focuses: Cc:

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 6 weeks ago.
Patch

Download all attachments as: .zip

Change History (2)

@kikk
6 weeks ago

Patch

#1 @desrosj
6 weeks ago

  • Version changed from 4.9.5 to 3.6

Related #23673.

Note: See TracTickets for help on using tickets.