summaryrefslogtreecommitdiff
path: root/build/jlibtool.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2010-07-27 22:09:45 +0000
committerStefan Fritsch <sf@apache.org>2010-07-27 22:09:45 +0000
commit443247b17081cb00b0e7f2f688889417cb45871f (patch)
tree1cb6ddc24a0845e85f254eec9056103e26b73d0b /build/jlibtool.c
parent473c87316e7cf23eadb438189d2932b86ac8afae (diff)
downloadapr-443247b17081cb00b0e7f2f688889417cb45871f.tar.gz
Fix various issues found by cppcheck
- error handling issues - use of uninitialized data - null pointer dereference - unused variables - memory/fd leaks - broken code in threadproc/beos/proc.c git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@979891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/jlibtool.c')
-rw-r--r--build/jlibtool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/build/jlibtool.c b/build/jlibtool.c
index 1ad5a1b27..892e26d56 100644
--- a/build/jlibtool.c
+++ b/build/jlibtool.c
@@ -1650,7 +1650,7 @@ const char* expand_path(const char *relpath)
getcwd(foo, PATH_MAX-1);
newpath = (char*)malloc(strlen(foo)+strlen(relpath)+2);
- strcat(newpath, foo);
+ strcpy(newpath, foo);
strcat(newpath, "/");
strcat(newpath, relpath);
return newpath;
@@ -1682,7 +1682,7 @@ void link_fixup(command_t *c)
push_count_chars(c->shared_opts.normal, DYNAMIC_INSTALL_NAME);
tmp = (char*)malloc(PATH_MAX);
- strcat(tmp, c->install_path);
+ strcpy(tmp, c->install_path);
strcat(tmp, strrchr(c->shared_name.normal, '/'));
push_count_chars(c->shared_opts.normal, tmp);
#endif