Closed
Bug 145370
Opened 23 years ago
Closed 23 years ago
Replace strcpy by strncpy for charset name copy.
Categories
(MailNews Core :: Internationalization, defect)
MailNews Core
Internationalization
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0.1
People
(Reporter: nhottanscp, Assigned: nhottanscp)
References
Details
(Keywords: intl, Whiteboard: [adt2])
Attachments
(1 file)
2.53 KB,
patch
|
bugzilla
:
review+
Bienvenu
:
superreview+
dbaron
:
approval+
|
Details | Diff | Splinter Review |
http://lxr.mozilla.org/seamonkey/source/mailnews/mime/src/comi18n.cpp#1076
http://lxr.mozilla.org/seamonkey/source/mailnews/mime/src/comi18n.cpp#310
http://lxr.mozilla.org/seamonkey/source/mailnews/compose/src/nsMsgCompUtils.cpp#779
http://lxr.mozilla.org/seamonkey/source/mailnews/compose/src/nsMsgSendPart.cpp#66
Comment 1•23 years ago
|
||
This is great - please make this change. It's best to use sizeof() for the size
argument to PL_strcpy. For example,
PL_strncpy(charset_label, charset, sizeof(charset_label) - 1);
charset_label[sizeof(charset_label) - 1)] = '\0';
Add the explicit null termination as above.
Assignee | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
Mitch, could you review the patch?
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Comment 4•23 years ago
|
||
Comment on attachment 84312 [details] [diff] [review]
Changed strcpy to strncpy.
R=ducarroz
Attachment #84312 -
Flags: review+
Comment 5•23 years ago
|
||
Comment on attachment 84312 [details] [diff] [review]
Changed strcpy to strncpy.
sr=bienvenu
Attachment #84312 -
Flags: superreview+
Assignee | ||
Comment 6•23 years ago
|
||
nsbeta1, the calls I changed were used for message compose/send, so far I have
not found actual problem but I think it's better to fix this to prevent unknown
problems.
Keywords: nsbeta1
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla1.0 → mozilla1.0.1
Comment 7•23 years ago
|
||
security issue. not sure this is adt2 or adt3. Put adt2 here for now. adt:
please change it if you disagree with that. thanks.
Assignee | ||
Comment 8•23 years ago
|
||
checked in to the trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•23 years ago
|
||
nsMsgSendPart.cpp 1.52
nsMsgCompUtils.cpp 1.138
comi18n.cpp 1.109
verified by cvs
Status: RESOLVED → VERIFIED
QA Contact: ji → nhotta
Updated•23 years ago
|
Keywords: adt1.0.1,
mozilla1.0.1
Comment 10•23 years ago
|
||
adding adt1.0.1+. Please get drivers approval before checking into the branch.
Comment on attachment 84312 [details] [diff] [review]
Changed strcpy to strncpy.
Please land this on the 1.0.1 branch. Once there, remove the
"mozilla1.0.1+" keyword, and add the "fixed1.0.1"
(Perhaps, *on the trunk*, it might make sense to fix this using PL_strncpyz
instead, which will allow sizeof(buffer) and allow removing the extra
null-termination code.)
Attachment #84312 -
Flags: approval+
Keywords: mozilla1.0.1 → mozilla1.0.1+
Assignee | ||
Updated•23 years ago
|
Keywords: fixed1.0.1
Updated•23 years ago
|
Updated•23 years ago
|
Keywords: mozilla1.0.1+
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•