Closed Bug 319453 Opened 15 years ago Closed 15 years ago

GetBlob should not crash if there is no data

Categories

(Toolkit :: Storage, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: brettw, Assigned: brettw)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

Doing GetBlob on a column with no data in it crashes when trying to Malloc(0) if the requested column is empty.

The rest of the GetX() functions return an empty string/0 integer/etc., and I would expect GetBlob would return a NULL pointer with a size of 0 in this case.
Attachment #205242 - Flags: first-review?(vladimir)
Comment on attachment 205242 [details] [diff] [review]
Check blob size for 0 before allocation

ouch, good catch.  r=vladimir
Attachment #205242 - Flags: first-review?(vladimir) → first-review+
Fixed on trunk
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Blocks: 324274
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.