Closed Bug 995655 Opened 6 years ago Closed 6 years ago

Fix -Wpointer-sign and -Wuinitialized warnings in libmar

Categories

(Toolkit :: Application Update, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31
Tracking Status
firefox30 --- wontfix
firefox31 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qa-])

Attachments

(2 files)

If mar_sign.c's import_signature() returns early, it can call fclose() on uninitialized FILE* local variables fpSrc, fpDest, and fpSigFile.
Attachment #8405792 - Flags: review?(robert.strong.bugs)
Fix -Wpointer-sign warnings in mar_read.c

modules/libmar/src/mar_read.c:564:29 [-Wpointer-sign] passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign
modules/libmar/src/mar_read.c:565:29 [-Wpointer-sign] passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign
modules/libmar/src/mar_read.c:565:53 [-Wpointer-sign] passing 'uint32_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign
Attachment #8405793 - Flags: review?(robert.strong.bugs)
Status: NEW → ASSIGNED
Summary: modules/libmar/sign/mar_sign.c:769:6: [-Wuninitialized] 'fpSrc' may be used uninitialized in this function → Fix -Wpointer-sign and -Wuinitialized warnings in libmar
Attachment #8405792 - Flags: review?(robert.strong.bugs) → review+
Comment on attachment 8405793 [details] [diff] [review]
fix-Wpointer-sign-warnings.patch

Thanks!
Attachment #8405793 - Flags: review?(robert.strong.bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/8b16eeaaf966
https://hg.mozilla.org/mozilla-central/rev/d4806a83b2bd
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.