git://git.openafs.org
/
openafs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Fix unchecked calls to asprintf
[openafs.git]
/
src
/
util
/
dirpath.c
diff --git
a/src/util/dirpath.c
b/src/util/dirpath.c
index
e4132ac
..
0317769
100644
(file)
--- a/
src/util/dirpath.c
+++ b/
src/util/dirpath.c
@@
-649,7
+649,8
@@
ConstructLocalPath(const char *cpath, const char *relativeTo,
if (*cpath == '/') {
newPath = strdup(cpath);
} else {
- asprintf(&newPath, "%s/%s", relativeTo, cpath);
+ if (asprintf(&newPath, "%s/%s", relativeTo, cpath) < 0)
+ newPath = NULL;
}
if (newPath == NULL)
status = ENOMEM;