pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust

pgsql: Handle zero-length sublist correctly in Python -> SQL array conv

2023-04-28 Thread Tom Lane
Handle zero-length sublist correctly in Python -> SQL array conversion. If PLySequence_ToArray came across a zero-length sublist, it'd compute the overall array size as zero, possibly leading to a memory clobber. (This would likely qualify as a security bug, were it not that plpython is an untrust