summaryrefslogtreecommitdiff
path: root/src/notes.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-02-09 23:41:13 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2015-02-12 22:54:46 -0500
commit392702ee2c88d7d8aaff25f7a84acb73606f9094 (patch)
tree97a66fe6e488797c6a9c2680ccb31964f61fe340 /src/notes.c
parentd24a5312d8ab6d3cdb259e450ec9f1e2e6f3399d (diff)
downloadlibgit2-392702ee2c88d7d8aaff25f7a84acb73606f9094.tar.gz
allocations: test for overflow of requested size
Introduce some helper macros to test integer overflow from arithmetic and set error message appropriately.
Diffstat (limited to 'src/notes.c')
-rw-r--r--src/notes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/notes.c b/src/notes.c
index f44c0bd95..1850e81c7 100644
--- a/src/notes.c
+++ b/src/notes.c
@@ -314,7 +314,7 @@ static int note_new(
{
git_note *note = NULL;
- note = (git_note *)git__malloc(sizeof(git_note));
+ note = git__malloc(sizeof(git_note));
GITERR_CHECK_ALLOC(note);
git_oid_cpy(&note->id, note_oid);