projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f05198c
)
Don't use alloca in rpmGenPath()
author
Jindrich Novy
<jnovy@redhat.com>
Tue, 29 Apr 2008 14:08:19 +0000
(16:08 +0200)
committer
Jindrich Novy
<jnovy@redhat.com>
Tue, 29 Apr 2008 14:08:19 +0000
(16:08 +0200)
rpmio/rpmfileutil.c
patch
|
blob
|
history
diff --git
a/rpmio/rpmfileutil.c
b/rpmio/rpmfileutil.c
index
49a4323
..
64510e9
100644
(file)
--- a/
rpmio/rpmfileutil.c
+++ b/
rpmio/rpmfileutil.c
@@
-485,17
+485,18
@@
char * rpmGenPath(const char * urlroot, const char * urlmdir,
}
if (url && nurl > 0) {
- char *t =
strncpy(alloca(nurl+1), url, n
url);
+ char *t =
rstrcat(NULL,
url);
t[nurl] = '\0';
url = t;
} else
- url =
""
;
+ url =
xstrdup("")
;
result = rpmGetPath(url, root, "/", mdir, "/", file, NULL);
xroot = _free(xroot);
xmdir = _free(xmdir);
xfile = _free(xfile);
+ _constfree(url);
return result;
}