@@ -12,15 +12,14 @@ PHP_FUNCTION(git_blob_create_frombuffer)
1212 int buffer_len ;
1313 int error ;
1414 git_oid id ;
15- char out [41 ] = {0 };
15+ char out [GIT2_OID_HEXSIZE ] = {0 };
1616
1717 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC ,
1818 "rs" , & repository , & buffer , & buffer_len ) == FAILURE ) {
1919 return ;
2020 }
2121
2222 ZEND_FETCH_RESOURCE (git2 , php_git2_t * , & repository , -1 , PHP_GIT2_RESOURCE_NAME , git2_resource_handle );
23-
2423 error = git_blob_create_frombuffer (& id , PHP_GIT2_V (git2 , repository ), buffer , buffer_len );
2524 if (php_git2_check_error (error , "git_blob_create_frombuffer" TSRMLS_CC )) {
2625 RETURN_FALSE
@@ -46,7 +45,7 @@ PHP_FUNCTION(git_blob_create_fromdisk)
4645 int path_len ;
4746 int error ;
4847 git_oid id ;
49- char out [41 ] = {0 };
48+ char out [GIT2_OID_HEXSIZE ] = {0 };
5049
5150 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC ,
5251 "rs" , & repository , & path , & path_len ) == FAILURE ) {
@@ -74,7 +73,7 @@ PHP_FUNCTION(git_blob_create_fromworkdir)
7473 int path_len ;
7574 int error ;
7675 git_oid id ;
77- char out [41 ] = {0 };
76+ char out [GIT2_OID_HEXSIZE ] = {0 };
7877
7978 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC ,
8079 "rs" , & repository , & path , & path_len ) == FAILURE ) {
@@ -124,7 +123,7 @@ PHP_FUNCTION(git_blob_id)
124123{
125124 zval * blob ;
126125 php_git2_t * git2 ;
127- char out [41 ] = {0 };
126+ char out [GIT2_OID_HEXSIZE ] = {0 };
128127 const git_oid * id ;
129128
130129 if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC ,
0 commit comments