Open
Bug 130020
Opened 23 years ago
Updated 2 years ago
Prototypes for many PL_str*() functions return |char *|-pointers for data passed as |const char *|
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
NEW
People
(Reporter: roland.mainz, Unassigned)
Details
I found a issue in most of the NSPR functions which can lead to hard-to-find
accidental data corruption and other evil issues:
Many of the string functions in NSPR return a |char *| pointer to data which
were passed as |const char *| - which may lead to hidden problems when code will
modify the returned (maybe a string which MUST be treated as |const|).
Example:
PL_strstr() is defined as
-- snip --
PR_EXTERN(char *) PL_strstr(const char *big, const char *little);
-- snip --
I think it may be better to define it as
-- snip --
PR_EXTERN(const char *) PL_strstr(const char *big, const char *little);
-- snip --
Comment 1•20 years ago
|
||
This is a disturbing bug. Fixing this
is sure to require changes to code using
NSPR.
Status: NEW → ASSIGNED
Updated•19 years ago
|
QA Contact: wtchang → nspr
Comment 2•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:KaiE, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: wtc → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(kaie)
Comment 4•3 years ago
|
||
Would be great to get some help on this, probably a nontrivial amount of work triggered by API changes (as predicted by WTC).
Flags: needinfo?(sledru)
Comment 5•3 years ago
|
||
if it has been around for 20 years, probably not...
Flags: needinfo?(sledru)
Comment 6•3 years ago
|
||
In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.
Severity: major → --
Comment 7•2 years ago
|
||
The severity field is not set for this bug.
:KaiE, could you have a look please?
For more information, please visit BugBot documentation.
Flags: needinfo?(kaie)
Updated•2 years ago
|
Severity: -- → S2
Flags: needinfo?(kaie)
You need to log in
before you can comment on or make changes to this bug.
Description
•