Closed Bug 776661 Opened 13 years ago Closed 13 years ago

silk_get_TOC doesn't zero out the entire silk_TOC_struct

Categories

(Core :: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

Attachments

(1 file, 1 obsolete file)

/media/storage/moz/mozilla-inbound/media/libopus/silk/dec_API.c:360:39: warning: 'silk_memset' call operates on objects of type 'silk_TOC_struct' while the size is based on a different type 'silk_TOC_struct *' [-Wsizeof-pointer-memaccess] silk_memset( Silk_TOC, 0, sizeof( Silk_TOC ) ); ~~~~~~~~ ^~~~~~~~ /media/storage/moz/mozilla-inbound/media/libopus/silk/dec_API.c:360:39: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)? silk_memset( Silk_TOC, 0, sizeof( Silk_TOC ) ); ^~~~~~~~ 1 warning generated.
Attached patch Patch (v1) (obsolete) — Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #645035 - Flags: review?(giles)
Analysis by :derf from #developers on irc: This doesn't affect our code; silk_get_TOC() is never called; it's left over code used by some other consumers of the SILK codec outside the opus tree. If it were called, it's probably low risk, since it would zero at least the first field, and the other fields are initialized explicitly, assuming the caller uses nFramesPerPayload consistently.
Comment on attachment 645035 [details] [diff] [review] Patch (v1) Fine with me, but please add it as an external patch file in the libopus directory and change update.sh to apply it.
Attachment #645035 - Flags: review?(giles) → review+
Attached patch Patch (v2)Splinter Review
Updated to patch to conform to local style for maintaining differences from upstream. Carrying forward my own r+.
Attachment #645035 - Attachment is obsolete: true
Attachment #645075 - Flags: review+
I'll check this in shortly. Thanks Ralph!
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: