diff options
| author | Linquize <linquize@yahoo.com.hk> | 2014-10-10 21:48:46 +0800 |
|---|---|---|
| committer | Linquize <linquize@yahoo.com.hk> | 2014-10-11 07:52:47 +0800 |
| commit | 0494a7c9a9affce8935b34fa6d7cd1b5428e081f (patch) | |
| tree | d79a5cb6fc33e9b5305710f7bb914dc36156cffb | |
| parent | fd0f6d38558a03e8f1685098bac0e86a2220c57d (diff) | |
| download | libgit2-0494a7c9a9affce8935b34fa6d7cd1b5428e081f.tar.gz | |
describe: Do not crash if pass null option to git_describe_commit()
| -rw-r--r-- | src/describe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/describe.c b/src/describe.c index 08c99a7d2..cd6e473b6 100644 --- a/src/describe.c +++ b/src/describe.c @@ -665,7 +665,6 @@ int git_describe_commit( GITERR_CHECK_ALLOC(data.result); data.result->repo = git_object_owner(committish); - data.opts = opts; data.repo = git_object_owner(committish); if ((error = normalize_options(&normalized, opts)) < 0) @@ -675,6 +674,7 @@ int git_describe_commit( &normalized, GIT_DESCRIBE_OPTIONS_VERSION, "git_describe_options"); + data.opts = &normalized; data.names = git_oidmap_alloc(); GITERR_CHECK_ALLOC(data.names); |
