Commit d1317f1b by Vicent Martí

Merge pull request #536 from nulltoken/fix/transport-segfault

Fix transport segfault
parents 6e03b12f 0b44c065
......@@ -169,7 +169,7 @@ int git_repository_open(git_repository **repo_out, const char *path)
if (quickcheck_repository_dir(&path_buf) < GIT_SUCCESS) {
error = git__throw(GIT_ENOTAREPO,
"The given path is not a valid Git repository");
"The given path (%s) is not a valid Git repository", git_buf_cstr(&path_buf));
goto cleanup;
}
......
......@@ -23,7 +23,7 @@ static struct {
{NULL, 0}
};
#define GIT_TRANSPORT_COUNT (sizeof(transports)/sizeof(transports[0]))
#define GIT_TRANSPORT_COUNT (sizeof(transports)/sizeof(transports[0])) - 1
static git_transport_cb transport_find_fn(const char *url)
{
......
......@@ -80,7 +80,7 @@ static int do_lstat(const char *file_name, struct stat *buf)
buf->st_uid = 0;
buf->st_nlink = 1;
buf->st_mode = (mode_t)fMode;
buf->st_size = (fdata.nFileSizeHigh << 32) + fdata.nFileSizeLow;
buf->st_size = ((git_off_t)fdata.nFileSizeHigh << 32) + fdata.nFileSizeLow;
buf->st_dev = buf->st_rdev = (_getdrive() - 1);
buf->st_atime = filetime_to_time_t(&(fdata.ftLastAccessTime));
buf->st_mtime = filetime_to_time_t(&(fdata.ftLastWriteTime));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment