Skip to content

sqlite: Blob type for oid field and libgit2 allocation#20

Open
gumenikav wants to merge 1 commit intolibgit2:masterfrom
gumenikav:sqlite_key_and_alloc_fix
Open

sqlite: Blob type for oid field and libgit2 allocation#20
gumenikav wants to merge 1 commit intolibgit2:masterfrom
gumenikav:sqlite_key_and_alloc_fix

Conversation

@gumenikav
Copy link

  • Text field is not suitable for an oid data, because of an oid can contain null-symbols.
  • The buffer should be allocated using the function git_odb_backend_malloc to ensure that it can be safely freed later
  • Тhere is no need to copy data(SQLITE_TRANSIENT) since query to the database is done in the scope of the same function

* Memory allocation using git_odb_backend_malloc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant