Displaying 4 results from an estimated 4 matches for "b49bf60".
2015 Feb 10
4
[PATCH 1/4] php: fix invalid memory access with OptString
OptString maps to a "s!" argument, which makes zend_parse_parameters not
touch the variables (char* and length) when NULL is passed as parameter.
Hence, set both to NULL/0, and check for non-NULL char* variable before
checking its length.
---
generator/php.ml | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/generator/php.ml b/generator/php.ml
index
2015 Feb 10
0
[PATCH 4/4] php: fix memory leak in OStringList optargs
Make sure to free the char** created to convert the arguments.
---
generator/php.ml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/generator/php.ml b/generator/php.ml
index 28903d0..b49bf60 100644
--- a/generator/php.ml
+++ b/generator/php.ml
@@ -458,6 +458,16 @@ PHP_FUNCTION (guestfs_last_error)
pr "\n"
| Bool _ | Int _ | Int64 _ | Pointer _ -> ()
) args;
+ List.iter (
+ function
+ | OBool n | OInt n | OInt64 n | OString...
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...n | Key n | Pointer (_, n) | GUID n ->
pr "$%s" n
- | StringList n | DeviceList n ->
+ | StringList n | DeviceList n | RelativePathnameList n ->
pr "\\@%s" n
) args;
List.iter (
diff --git a/generator/php.ml b/generator/php.ml
index b49bf60..82e0cd4 100644
--- a/generator/php.ml
+++ b/generator/php.ml
@@ -240,7 +240,8 @@ PHP_FUNCTION (guestfs_last_error)
pr " char *%s = NULL;\n" n;
pr " int %s_size;\n" n
| StringList n
- | DeviceList n ->
+ | DeviceList n
+...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...ufferIn n | Key n | Pointer (_, n) | GUID n ->
pr "$%s" n
- | StringList n | DeviceList n ->
+ | StringList n | DeviceList n | FilenameList n ->
pr "\\@%s" n
) args;
List.iter (
diff --git a/generator/php.ml b/generator/php.ml
index b49bf60..cb0543a 100644
--- a/generator/php.ml
+++ b/generator/php.ml
@@ -240,7 +240,8 @@ PHP_FUNCTION (guestfs_last_error)
pr " char *%s = NULL;\n" n;
pr " int %s_size;\n" n
| StringList n
- | DeviceList n ->
+ | DeviceList n
+...