UDF returning 0 for a varchar pointer aborts engine
---------------------------------------------------
Key: CORE-5007
URL: http://tracker.firebirdsql.org/browse/CORE-5007
Project: Firebird Core
Issue Type: Bug
Components: UDF
Affects Versions: 2.5.2 Update 1
Environment: A UDF returing a FREE_IT CSTRING(5) CHARACTER SET NONE
causes the engine to crash if I return 0 instead of a pointer
Reporter: Ray Holme
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;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel