OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e26a597
)
This patch from Rik Faith <faith@alephnull.com> fixes a potentially
author
Eric Andersen
<andersen@codepoet.org>
Tue, 11 Jun 2002 12:54:12 +0000
(12:54 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Tue, 11 Jun 2002 12:54:12 +0000
(12:54 -0000)
non-NULL terminated string problem that could result from the use
of open_memstream(). Manuel may have a better solution, but this
one works for me, since with this plus the popen fix I can now run
things like gdb properly. Thanks Rik!
libc/stdio/printf.c
patch
|
blob
|
history
diff --git
a/libc/stdio/printf.c
b/libc/stdio/printf.c
index
92b5b59
..
e311a4f
100644
(file)
--- a/
libc/stdio/printf.c
+++ b/
libc/stdio/printf.c
@@
-1451,6
+1451,7
@@
int vasprintf(char **__restrict buf, const char * __restrict format,
return -1;
}
rv = vfprintf(f, format, arg);
+ if (rv >= 0) fputc('\0', f);
fclose(f);
if (rv < 0) {
free(*buf);