[CID 1351139] Uninitialized 'err' in OmxCommonVideoConfig::Apply()

RESOLVED FIXED in Firefox 61

Status

()

P3
normal
RESOLVED FIXED
3 years ago
5 months ago

People

(Reporter: gerald, Assigned: jeanluc.bonnafoux)

Tracking

43 Branch
mozilla61
Points:
---

Firefox Tracking Flags

(firefox61 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

59 bytes, text/x-review-board-request
jya
: review+
Details
(Reporter)

Description

3 years ago
In dom/media/platforms/omx/OmxPlatformLayer.cpp:
> 98  OMX_ERRORTYPE Apply(OmxPlatformLayer& aOmx, const VideoInfo& aInfo) override
> 99  {
    1. var_decl: Declaring variable err without initializer.
>100    OMX_ERRORTYPE err;
>101    OMX_PARAM_PORTDEFINITIONTYPE def;
>102
>103    // Set up in/out port definition.
>104    nsTArray<uint32_t> ports;
>105    GetOmxPortIndex(ports);
    2. No elements left in ports, leaving loop
>106    for (auto idx : ports) {
>[...]
>129    }
    CID 1351139 (#1 of 1): Uninitialized scalar variable (UNINIT)3. uninit_use: Using uninitialized value err.
>130    return err;
>131  }
Priority: -- → P2
(Reporter)

Updated

3 years ago
Summary: [CID 1351139} Uninitialized 'err' in OmxCommonVideoConfig::Apply() → [CID 1351139] Uninitialized 'err' in OmxCommonVideoConfig::Apply()
Mass change P2 -> P3
Priority: P2 → P3
Comment hidden (mozreview-request)

Comment 3

5 months ago
mozreview-review
Comment on attachment 8969752 [details]
Bug 1244870 - initialization of err variable

https://reviewboard.mozilla.org/r/238564/#review244884

::: dom/media/platforms/omx/OmxPlatformLayer.cpp:57
(Diff revision 1)
> -  OMX_ERRORTYPE err;
> +  OMX_ERRORTYPE err = OMX_ErrorNone;
>  
>    OMX_PARAM_PORTDEFINITIONTYPE def;
>    InitOmxParameter(&def);
>    def.nPortIndex = aOmx.OutputPortIndex();
>    err = aOmx.GetParameter(OMX_IndexParamPortDefinition, &def, sizeof(def));

declare err as OMX_ERRORTYPE where it's first use.

eg.
OMX_ERRORTYPR err = aOmx.GetParameter(....)
Attachment #8969752 - Flags: review?(jyavenard) → review-
(Assignee)

Comment 4

5 months ago
mozreview-review
Comment on attachment 8969752 [details]
Bug 1244870 - initialization of err variable

https://reviewboard.mozilla.org/r/238564/#review245132

::: dom/media/platforms/omx/OmxPlatformLayer.cpp:57
(Diff revision 1)
> -  OMX_ERRORTYPE err;
> +  OMX_ERRORTYPE err = OMX_ErrorNone;
>  
>    OMX_PARAM_PORTDEFINITIONTYPE def;
>    InitOmxParameter(&def);
>    def.nPortIndex = aOmx.OutputPortIndex();
>    err = aOmx.GetParameter(OMX_IndexParamPortDefinition, &def, sizeof(def));

Thanks for the code review, i will add a patch accordingly.
Comment hidden (mozreview-request)
(Assignee)

Updated

5 months ago
Attachment #8969752 - Attachment is obsolete: true

Comment 6

5 months ago
mozreview-review
Comment on attachment 8970656 [details]
Bug 1244870 - initialization of err variable

https://reviewboard.mozilla.org/r/239400/#review245694
Attachment #8970656 - Flags: review?(jyavenard) → review+
Assignee: nobody → jeanluc.bonnafoux
(Assignee)

Updated

5 months ago
Keywords: checkin-needed

Comment 7

5 months ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/64583d3e0f6f
initialization of err variable r=jya
Keywords: checkin-needed

Comment 8

5 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/64583d3e0f6f
Status: NEW → RESOLVED
Last Resolved: 5 months ago
status-firefox61: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.