Closed Bug 333306 Opened 18 years ago Closed 18 years ago

Crash with pragma statements that return values

Categories

(Toolkit :: Storage, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: matthew.gertner, Assigned: matthew.gertner)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file, 1 obsolete file)

I got a crash when using PRAGMA user_version. The reason is that mozStorageStatement retrieves the name for each column in a result set and storages it in an array (which, as far as I can see, is never used for anything... but I might be missing something). In the case of PRAGMA user_version (and, I assume, other PRAGMA statements that return values), the name is NULL.
Assignee: vladimir → matthew
Status: NEW → ASSIGNED
Attachment #217725 - Flags: first-review?
Attachment #217725 - Flags: first-review? → first-review?(vladimir)
Comment on attachment 217725 [details] [diff] [review]
Adds a check to prevent crashing when the column name is NULL

We should still append something to mColumnNames -- an empty string or even a string with the null bit set.
Attachment #217725 - Flags: first-review?(vladimir) → first-review-
Attachment #217725 - Attachment is obsolete: true
Attachment #218851 - Flags: first-review?(vladimir)
Comment on attachment 218851 [details] [diff] [review]
Adds an empty string if no column name is available

Looks good, thanks for making the change!
Attachment #218851 - Flags: first-review?(vladimir) → first-review+
Attachment #218851 - Flags: approval-branch-1.8.1?(vladimir)
I requested 1.8.1 approval since we won't be able to run on FF 2.0 without this.
Attachment #218851 - Flags: approval-branch-1.8.1?(vladimir) → approval-branch-1.8.1+
Whiteboard: [checkin needed]
Flags: blocking-firefox2?
Does this need to be checked in?
Yes.
This shouldn't be checked in until bug 338155 has landed, which is the new version of sqlite.
Depends on: 338155
Flags: blocking-firefox2? → blocking-firefox2+
Fixed on trunk and 1.8 branch.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Blocks: 365166
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: