generator: Check parameters are not NULL (RHBZ#501893).
authorRichard Jones <rjones@redhat.com>
Wed, 19 May 2010 11:27:00 +0000 (12:27 +0100)
committerRichard Jones <rjones@redhat.com>
Thu, 20 May 2010 09:30:12 +0000 (10:30 +0100)
commit30c091f49dafab4ca9c8b6640d19fc0450b15971
treec4bba201e9cff32aeb533041bbb8ee3d2b49dd7b
parente715451fae0ba738973af98a4e506b6c5564626a
generator: Check parameters are not NULL (RHBZ#501893).

This adds additional tests to check that several types of parameter
including String are not NULL when passed to the C functions.
Previously this would cause a segfault inside libguestfs.  With
this change, you get an error message / exception.

Of the possible pointer parameters, only OptString is now permitted
to be NULL.

This change does not affect the Perl bindings.  This is because Perl
XS code was already adding similar checks if you passed undef into
a parameter expecting a string.
.gitignore
po/POTFILES.in
regressions/Makefile.am
regressions/rhbz501893.c [new file with mode: 0644]
src/generator.ml