Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDF returning 0 for a varchar pointer aborts engine [CORE5007] #5295

Open
firebird-automations opened this issue Nov 11, 2015 · 0 comments
Open

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Ray Holme (rholme)

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant