search for: guestfs_int_py_put_

Displaying 6 results from an estimated 6 matches for "guestfs_int_py_put_".

2017 Apr 25
1
[Bug #1406906] [PATCH] python: fix segmentation fault when setting non UTF-8 strings
...--- 1 file changed, 97 insertions(+), 46 deletions(-) diff --git a/generator/python.ml b/generator/python.ml index 11dc48102..7d86131b1 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -152,12 +152,20 @@ and generate_python_structs () = pr "PyObject *\n"; pr "guestfs_int_py_put_%s_list (struct guestfs_%s_list *%ss)\n" typ typ typ; pr "{\n"; - pr " PyObject *list;\n"; + pr " PyObject *list, *element;\n"; pr " size_t i;\n"; pr "\n"; pr " list = PyList_New (%ss->len);\n" typ; -...
2017 Mar 18
0
[PATCH] python: check return value of Python APIs
...--- 1 file changed, 97 insertions(+), 46 deletions(-) diff --git a/generator/python.ml b/generator/python.ml index 11dc48102..d03275276 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -152,12 +152,20 @@ and generate_python_structs () = pr "PyObject *\n"; pr "guestfs_int_py_put_%s_list (struct guestfs_%s_list *%ss)\n" typ typ typ; pr "{\n"; - pr " PyObject *list;\n"; + pr " PyObject *list, *element;\n"; pr " size_t i;\n"; pr "\n"; pr " list = PyList_New (%ss->len);\n" typ; -...
2017 May 11
1
[PATCH v2] RHBZ#1406906: check return value of Python object functions
...(-) create mode 100644 python/t/test830RHBZ1406906.py diff --git a/generator/python.ml b/generator/python.ml index cf0829489..4cae24757 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -155,12 +155,20 @@ and generate_python_structs () = pr "PyObject *\n"; pr "guestfs_int_py_put_%s_list (struct guestfs_%s_list *%ss)\n" typ typ typ; pr "{\n"; - pr " PyObject *list;\n"; + pr " PyObject *list, *element;\n"; pr " size_t i;\n"; pr "\n"; pr " list = PyList_New (%ss->len);\n" typ; -...
2017 May 09
1
[PATCH] RHBZ#1406906: check return value of Python object functions
...(-) create mode 100644 python/t/test830RHBZ1406906.py diff --git a/generator/python.ml b/generator/python.ml index cf0829489..4cae24757 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -155,12 +155,20 @@ and generate_python_structs () = pr "PyObject *\n"; pr "guestfs_int_py_put_%s_list (struct guestfs_%s_list *%ss)\n" typ typ typ; pr "{\n"; - pr " PyObject *list;\n"; + pr " PyObject *list, *element;\n"; pr " size_t i;\n"; pr "\n"; pr " list = PyList_New (%ss->len);\n" typ; -...
2017 May 06
5
[Bug 1406906] [PATCH 0/3] Fix segmentation fault in Python bindings
This series addresses the issue where non UTF8 file names in a guest image lead to libguestfs segfault with Python 3 APIs. The core issue is the APIs are not checking the return value when constructing a new PyObject. Therefore NULL pointers are added to Python collections (lists and dictionaries) crashing the application. Few notes regarding the comments on the previous patch. - Added a
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...output_string !chan str ) fs diff --git a/generator/python.ml b/generator/python.ml index 281fb0a..1e24a59 100644 --- a/generator/python.ml +++ b/generator/python.ml @@ -20,6 +20,7 @@ open Printf +open Common_utils open Types open Utils open Pr @@ -94,14 +95,14 @@ extern PyObject *guestfs_int_py_put_table (char * const * const argv); "; let emit_put_list_decl typ = - pr "#ifdef GUESTFS_HAVE_STRUCT_%s\n" (String.uppercase typ); + pr "#ifdef GUESTFS_HAVE_STRUCT_%s\n" (String.uppercase_ascii typ); pr "extern PyObject *guestfs_int_py_put_%s_list (struc...