Title: git_tree_entry should not be selfFreeing · Issue #1333 · nodegit/nodegit · GitHub
Open Graph Title: git_tree_entry should not be selfFreeing · Issue #1333 · nodegit/nodegit
X Title: git_tree_entry should not be selfFreeing · Issue #1333 · nodegit/nodegit
Description: git_tree_entry is marked as self freeing. But libgit2 only requires free'ing these in cases where the entry is retrieved from git_tree_entry_dup or git_tree_entry_bypath. Neither of which is exposed by nodegit. This can lead to memory co...
Open Graph Description: git_tree_entry is marked as self freeing. But libgit2 only requires free'ing these in cases where the entry is retrieved from git_tree_entry_dup or git_tree_entry_bypath. Neither of which is expose...
X Description: git_tree_entry is marked as self freeing. But libgit2 only requires free'ing these in cases where the entry is retrieved from git_tree_entry_dup or git_tree_entry_bypath. Neither of which is ex...
Opengraph URL: https://github.com/nodegit/nodegit/issues/1333
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"git_tree_entry should not be selfFreeing","articleBody":"git_tree_entry is marked as self freeing. But libgit2 only requires free'ing these in cases where the entry is retrieved from git_tree_entry_dup or git_tree_entry_bypath. Neither of which is exposed by nodegit. This can lead to memory corruption and/or double free.\r\n\r\nI created #1332 to fix the issue.\r\n\r\nFairly easy to reproduce with the below running in a loop.\r\n```\r\nconst builder = await git.Treebuilder.create(repository, null);\r\n\r\nconst oid = git.Oid.fromString(\"b45ef6fec89518d314f546fd6c3025367b721684\");\r\nfor (let i = 0; i \u003c 100; i++) {\r\n builder.insert(\r\n moniker.choose(),\r\n oid,\r\n parseInt(\"100644\", 8));\r\n}\r\nbuilder.write();\r\n```\r\n","author":{"url":"https://github.com/kurtb","@type":"Person","name":"kurtb"},"datePublished":"2017-07-26T21:41:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1333/nodegit/issues/1333"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3c4a7fdb-a3f4-9f77-655f-710e5b2b49bf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 959E:78046:E7497:138730:6A5FE6CD |
| html-safe-nonce | ea6411a6cf373835c757777c925d25f18be6dc76da74a872f4bba8fea2e1bc07 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTlFOjc4MDQ2OkU3NDk3OjEzODczMDo2QTVGRTZDRCIsInZpc2l0b3JfaWQiOiI3NzYyMTg2NjUyMjk1ODgyNDQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7db52b6ab86a09f2c981441c9932525635b6d3175f6afffc31b75d270c2aad1c |
| hovercard-subject-tag | issue:245863254 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodegit/nodegit/1333/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3ffd8823dda7da8f727c40f0ad286ec813f1f8c946549f46cccc20b1fa8359da/nodegit/nodegit/issues/1333 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3ffd8823dda7da8f727c40f0ad286ec813f1f8c946549f46cccc20b1fa8359da/nodegit/nodegit/issues/1333 |
| og:image:alt | git_tree_entry is marked as self freeing. But libgit2 only requires free'ing these in cases where the entry is retrieved from git_tree_entry_dup or git_tree_entry_bypath. Neither of which is expose... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kurtb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 78938542173c0d8e4ad1aefc7954896e81c10ce2620286603ef14cf593bd5a11 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1a427601e09953033b696253e754ebc7328096a7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width