pygspawn: improve error checking
gspawn 'argv' and 'envp' parameters expect sequences of strings. This is enforced by checking that the passed argument is a sequence and that each item returned from it is a string. We do now, however, verify that each item can be successfully taken from the sequence. 'os.environ' is an example of an object that passes PySequence_Check() but fails to return objects from PySequence_ITEM(). Add a simple NULL check to avoid the crash. https://bugzilla.gnome.org/show_bug.cgi?id=669594
parent
8fc969c4
Please register or sign in to comment