diff options
| author | Jacques Germishuys <jacquesg@striata.com> | 2014-04-30 17:46:53 +0200 |
|---|---|---|
| committer | Jacques Germishuys <jacquesg@striata.com> | 2014-04-30 22:58:40 +0200 |
| commit | 183aa4f8317f5a64f1bc931551a342e6a93ce1c3 (patch) | |
| tree | f450ebd3787b217f5a9035e46af5e6516ee70035 /src/config.c | |
| parent | 6b05240ceaf4df7bbb4806f6827f0314db6a5a91 (diff) | |
| download | libgit2-183aa4f8317f5a64f1bc931551a342e6a93ce1c3.tar.gz | |
Check for NULL before passing it to vsnprintf
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c index b3168f735..16854c0c8 100644 --- a/src/config.c +++ b/src/config.c @@ -1144,7 +1144,7 @@ int git_config_parse_int64(int64_t *out, const char *value) } fail_parse: - giterr_set(GITERR_CONFIG, "Failed to parse '%s' as an integer", value); + giterr_set(GITERR_CONFIG, "Failed to parse '%s' as an integer", value ? value : "(null)"); return -1; } @@ -1164,7 +1164,7 @@ int git_config_parse_int32(int32_t *out, const char *value) return 0; fail_parse: - giterr_set(GITERR_CONFIG, "Failed to parse '%s' as a 32-bit integer", value); + giterr_set(GITERR_CONFIG, "Failed to parse '%s' as a 32-bit integer", value ? value : "(null)"); return -1; } |
