History

video/hdmi: Reject illegal picture aspect ratios

AVI infoframe can only carry none, 4:3, or 16:9 picture aspect ratios. Return an error if the user asked for something different.

Ville Syrjälä committed 8 years ago

Commit bfe2e2c1 parent a9c266c1 file · +3 −0Browse files

Unified · Split

drivers/video/hdmi.c+3−0
@@ -93,6 +93,9 @@ ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer, · 92 unmodified lines
9393 if (size < length)
9494 return -ENOSPC;
9595
96+ if (frame->picture_aspect > HDMI_PICTURE_ASPECT_16_9)
97+ return -EINVAL;
98+
9699 memset(buffer, 0, size);
97100
98101 ptr[0] = frame->type;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t