Issue Details (XML | Word | Printable)

Key: CORE-5007
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Ray Holme
Votes: 0
Watchers: 2

If you were logged in you would be able to see more operations.
Firebird Core

UDF returning 0 for a varchar pointer aborts engine

Created: 11/Nov/15 12:43 PM   Updated: 11/Nov/15 12:43 PM
Component/s: UDF
Affects Version/s: 2.5.2 Update 1
Fix Version/s: None

A UDF returing a FREE_IT CSTRING(5) CHARACTER SET NONE causes the engine to crash if I return 0 instead of a pointer

QA Status: No test

 Description  « Hide
It used to be valid to return the value 0 for a null pointer. I have no idea if this is due to the FREE-IT phrase or just a null pointer exception.
However it used to work. I fixed the issue by always return a real "ib-malloc'd" string. It would be better if the engine handled this more gracefully.
To be concise - here is the OLD c-code which I have used for a long time.
      if (some-test) return 0;

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.