Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.9.3
-
None
-
None
-
GNU/Linux (Debian/unstable).
Description
SVN::Core::dirent_canonicalize segfaults on undef:
$ perl -MSVN::Core -e 'SVN::Core::dirent_canonicalize(undef)' zsh: segmentation fault (core dumped) perl -MSVN::Core -e 'SVN::Core::dirent_canonicalize(undef)'
In case of undef, I suppose that the Perl module should pass an empty string to the library (for which there are no errors), or return some other kind of error.
In the binding generation, I suspect that undef is regarded as a null pointer. This is fine if the library function accepts a null pointer, but if the function expects a character string like here, undef should be regarded as the empty string as usual in Perl (or an error). Couldn't the code have enough information so that swig generates the right bindings?