Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
difftool: handle unmerged files in dir-diff mode
[gitweb.git]
/
compat
/
setenv.c
diff --git
a/compat/setenv.c
b/compat/setenv.c
index fc1439a6439393ff5224e98ab126607ceaa4994d..7849f258d20195ac27c9be921fb8b65ac094a408 100644
(file)
--- a/
compat/setenv.c
+++ b/
compat/setenv.c
@@
-18,7
+18,7
@@
int gitsetenv(const char *name, const char *value, int replace)
namelen = strlen(name);
valuelen = strlen(value);
- envstr = malloc(
(namelen + valuelen +
2));
+ envstr = malloc(
st_add3(namelen, valuelen,
2));
if (!envstr) {
errno = ENOMEM;
return -1;