Closed Bug 1338498 Opened 8 years ago Closed 7 years ago

Incorrect size of memset in vp8_create_decoder_instances

Categories

(Core :: WebRTC: Audio/Video, defect, P5)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1480374
Tracking Status
firefox54 --- affected

People

(Reporter: jseward, Assigned: jseward)

Details

Attachments

(1 file)

gcc 7 -Wall reports Warning: -Wmemset-elt-size in /home/sewardj/MOZ/MC-TALL/media/libvpx/libvpx/vp8/decoder/onyxd_if.c: ‘memset’ used with length equal to number of elements without multiplication by element size home/sewardj/MOZ/MC-TALL/media/libvpx/libvpx/vp8/decoder/onyxd_if.c:449:5: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] memset(fb->pbi, 0, sizeof(fb->pbi) / sizeof(fb->pbi[0]));
Attachment #8835979 - Flags: review?(rjesup)
Comment on attachment 8835979 [details] [diff] [review] bug1338498-1.cset Review of attachment 8835979 [details] [diff] [review]: ----------------------------------------------------------------- punting review over to a libvpx maintainer who imported 1.6.1 ::: media/libvpx/libvpx/vp8/decoder/onyxd_if.c @@ +445,5 @@ > > #if CONFIG_MULTITHREAD > if (setjmp(fb->pbi[0]->common.error.jmp)) { > vp8_remove_decoder_instances(fb); > + memset(fb->pbi, 0, sizeof(fb->pbi)); I think this doesn't intend to clear all of pbi, but only the first element of it (given the code around it with all the hard-coded [0]'s, and the same in the if()).
Attachment #8835979 - Flags: review?(rjesup) → review?(johannkoenig)
Rank: 45
Priority: -- → P4
Attachment #8835979 - Flags: review?(johannkoenig)
Johann, would it be possible to resolve this?
Flags: needinfo?(johannkoenig)
Johann, ping?
I submitted the fix for this: v1.6.1-284-g47cf7c25a 47cf7c25a Merge "vp8_create_decoder_instances: correct pbi[] memset" 9c3c1f372 vp8_create_decoder_instances: correct pbi[] memset
Comment on attachment 8835979 [details] [diff] [review] bug1338498-1.cset Review of attachment 8835979 [details] [diff] [review]: ----------------------------------------------------------------- Exact same patch landed upstream, r+'ing on that basis
Attachment #8835979 - Flags: review+
jseward: NOTE: patch is not landable as-is. A .patch file must be added to the libvpx directory, and the import script (update.py) updated to apply it.
Flags: needinfo?(jseward)
Flags: needinfo?(johannkoenig)
Mass change P4->P5 to align with new Mozilla triage process.
Priority: P4 → P5
Flags: needinfo?(jseward)
Duping forward because the patch has landed in that bug.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: