Profile name and profile directory have trailing garbage.

RESOLVED FIXED

Status

Core Graveyard
Ports: Qt
RESOLVED FIXED
13 years ago
9 years ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

13 years ago
nsMemory::Clone doesn't append NULL so users must ensure one exists.
(Assignee)

Comment 1

13 years ago
Created attachment 168233 [details] [diff] [review]
ensures NULL after clone.
(Assignee)

Updated

13 years ago
Attachment #168233 - Flags: review?(zack)

Updated

13 years ago
Attachment #168233 - Flags: review?(zack) → review+

Comment 2

13 years ago
I apologize for sticking my nose into this bug, but I happened to read the patch
and I don't understand how it fixes the problem.

If the source strings are 0-terminated, then I don't understand what is wrong
with the original code; it seems to me it'll correctly clone each string
including its 0 terminator.

If the source strings aren't 0-terminated, then the original code could fail
with the symptom described here, because the strlen() call would return an
invalid length. But the new code in the patch also calls strlen() on the source
strings, so it would fail the same way.

I also wonder why the second copy operation calls strlen(aDir) instead of
strlen(aName), but the original code does that so maybe it's deliberate.

Comment 3

13 years ago
Created attachment 168244 [details] [diff] [review]
a fix

Yeah, I don't really mind the patch as long as the bug, which is the use of
aDir instead of aName is fixed. I would prefer though if this patch would be
used instead (both for GTK+ and Qt embedding code)
Attachment #168233 - Attachment is obsolete: true
(Assignee)

Comment 4

13 years ago
Comment on attachment 168244 [details] [diff] [review]
a fix

yeah, better.
Attachment #168244 - Flags: review+
Did this patch just get lost in the shuffle?  Could someone land it please?  Or
let me know and I'll do it...
(Assignee)

Comment 6

13 years ago
lost in the shuffle. land it if you can.

Comment 7

13 years ago
I applied it a while ago, but forgot to close the report. Closing it now. 
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
QA Contact: cbiesinger → ports-qt
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.