openzim / node-libzim

Libzim binding for Node.js: read/write ZIM files in Javascript
https://www.npmjs.com/package/@openzim/libzim
GNU General Public License v3.0
27 stars 11 forks source link

Fixes blob memory allocation. #93

Closed kelvinhammond closed 1 year ago

kelvinhammond commented 1 year ago

Error reported here https://github.com/nodejs/node-addon-api/issues/1174#issuecomment-1423250863

This fixes the use after free memory issue with the blob object by creating a shared_ptr for the new blob's data that blob will then own.

kelson42 commented 1 year ago

@kelvinhammond Which bug does it fox? There is no ticket linked to this PR.

kelvinhammond commented 1 year ago

@kelson42 It fixes this bug https://github.com/nodejs/node-addon-api/issues/1174#issuecomment-1423250863 that was found by @kevineady

kelson42 commented 1 year ago

@kelvinhammond Great, this huge!!! @mgautierfr Please have a look so we can move forward with the release.