Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c3c30e
)
Check return value of asprintf() in full_fname(), as pointed
author
Wayne Davison
<wayned@samba.org>
Sat, 29 Jul 2006 21:04:35 +0000
(21:04 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 29 Jul 2006 21:04:35 +0000
(21:04 +0000)
out by Ilja van Sprundel.
util.c
patch
|
blob
|
blame
|
history
diff --git
a/util.c
b/util.c
index
85b2227
..
afe1f88
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-1033,7
+1033,8
@@
char *full_fname(const char *fn)
} else
m1 = m2 = m3 = "";
- asprintf(&result, "\"%s%s%s\"%s%s%s", p1, p2, fn, m1, m2, m3);
+ if (asprintf(&result, "\"%s%s%s\"%s%s%s", p1, p2, fn, m1, m2, m3) <= 0)
+ out_of_memory("full_fname");
return result;
}