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

NEW
Unassigned

Status

()

Toolkit
General
a year ago
a year ago

People

(Reporter: andi, Unassigned, Mentored)

Tracking

(Blocks: 1 bug, {coverity, good-first-bug})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: CID 1405728)

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

a year ago
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.
(Reporter)

Updated

a year ago
Assignee: bpostelnicu → nobody
Mentor: bpostelnicu
Keywords: good-first-bug
Comment hidden (mozreview-request)
(Reporter)

Comment 2

a year ago
(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.
(Reporter)

Updated

a year ago
Attachment #8867579 - Flags: review?(bpostelnicu) → review?(mhowell)

Comment 3

a year ago
mozreview-review
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+
You need to log in before you can comment on or make changes to this bug.