Closed Bug 1363011 Opened 7 years ago Closed 5 years ago

[Static Analysis] Buffer not null terminated in int NS_main(int argc, NS_tchar **argv)

Categories

(Toolkit :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: andi, Assigned: andi, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, good-first-bug, Whiteboard: CID 1405728)

Attachments

(1 file, 1 obsolete file)

The Static Analysis tool Coverity detected that |gPatchDirPath| can be not null terminated when we copy MAXPATHLEN

>>  // The directory containing the update information.
>>  NS_tstrncpy(gPatchDirPath, argv[1], MAXPATHLEN);
>>
>>  // This check is also performed in workmonitor.cpp since the maintenance
>>  // service can be called directly.
Assignee: bpostelnicu → nobody
Mentor: bpostelnicu
Keywords: good-first-bug
(In reply to Santiago Paez [:tiago] from comment #1)
> Created attachment 8867579 [details]
> Bug 1363011 - [Static Analysis] Buffer not null terminated in int
> NS_main(int argc, NS_tchar **argv).
> 
> Review commit: https://reviewboard.mozilla.org/r/139126/diff/#index_header
> See other reviews: https://reviewboard.mozilla.org/r/139126/

Hello,

Thanks for the patch, i think for this module Matt can do the review.
Attachment #8867579 - Flags: review?(bpostelnicu) → review?(mhowell)
Comment on attachment 8867579 [details]
Bug 1363011 - [Static Analysis] Buffer not null terminated in int NS_main(int argc, NS_tchar **argv).

https://reviewboard.mozilla.org/r/139126/#review142554

Looks good! Thanks.
Attachment #8867579 - Flags: review?(mhowell) → review+
Can this be landed ?
Flags: needinfo?(bpostelnicu)
Assignee: nobody → bpostelnicu
Flags: needinfo?(bpostelnicu)
(In reply to Tim Nguyen :ntim from comment #4)
> Can this be landed ?

Completely forgot about this one, thanks for pining me. I would land it right now, but it seems mozreview is dead.
Attachment #8867579 - Attachment is obsolete: true
Attachment #8867579 - Flags: review+
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1e631819bbe5
[Static Analysis] Buffer not null terminated in int NS_main(int argc, NS_tchar **argv). r=mhowell
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: