Fix: Python bindings array access functions write out of bounds
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 16 Sep 2013 23:59:00 +0000 (19:59 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 13 Nov 2013 02:57:16 +0000 (21:57 -0500)
commitcebae8c3f3b5dba2af88242c8f17bf44fe63c715
tree47ad6eae29cb706ad034c56ba43d39b0202dbefb
parent3a068915df64d2480d176ae58913f9d04d72f87c
Fix: Python bindings array access functions write out of bounds

The array access functions in the Python complements are writing
past the last element to add a NULL pointer and then using it from the
Python code to detect the end of the array. This may cause stability
issues.

This changes the functions to return multiple values (array and length)
in Python using SWIG's built-in OUTPUT typemaps.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bindings/python/babeltrace.i.in
bindings/python/python-complements.c
bindings/python/python-complements.h
This page took 0.024234 seconds and 4 git commands to generate.