asfernandes / node-firebird-drivers

Node.js Firebird Drivers
MIT License
53 stars 17 forks source link

Prevent segfault if incorrect blob column is passed to openBlob() #37

Open mreis1 opened 4 years ago

mreis1 commented 4 years ago

Example:

// a)
const blob = results[0][0] as Blob; // This is the correct way to pass in the blob reference
// b)
const blob = results[0] as Blob; // But, an incorrect value such as this one, will cause a segfault
const blobStream = await attachment.openBlob(transaction, blob);