The default bug view has changed. See this FAQ.

Fix nullptr abuse in comm-central

RESOLVED FIXED in Thunderbird 18.0

Status

MailNews Core
Backend
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: sid0, Assigned: sid0)

Tracking

unspecified
Thunderbird 18.0
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 659594 [details] [diff] [review]
patch v1

comm-central uses nullptr in areas where it shouldn't be used. This fixes those cases.
Attachment #659594 - Flags: review?(mbanner)
>-          tmp = '%'; *end = nullptr;
>+          tmp = '%'; *end = NULL;
>         }
>         else if (end-1 > start && *(end-1) == '%')
>         {
>-          end -= 1; tmp = '%'; *end = nullptr;
>+          end -= 1; tmp = '%'; *end = NULL;
>         }
>         else if (end-2 > start && *(end-2) == '%')
>         {
>-          end -= 2; tmp = '%'; *end = nullptr;
>+          end -= 2; tmp = '%'; *end = NULL;
>         }
>         else
>         {
>-          tmp = *end; *end = nullptr;
>+          tmp = *end; *end = NULL;
|*end = 0;| or |*end = '\0';|. *end is not a pointer.
Comment on attachment 659594 [details] [diff] [review]
patch v1

r=me with the change of END -> 0 for the "*end = " cases. I'll land this in a moment as the tree is busted with this.
Attachment #659594 - Flags: review?(mbanner) → review+
Target Milestone: --- → Thunderbird 18.0
Checked in: https://hg.mozilla.org/comm-central/rev/d210f0b60e38
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.