sharedspice.c, bug fix, don't write beyond size of array `p'
This commit is contained in:
parent
b6ed9a3620
commit
08ca40fe73
|
|
@ -944,7 +944,6 @@ sh_vfprintf(FILE *f, const char *fmt, va_list args)
|
||||||
|
|
||||||
if(nchars == -1) { // compatibility to old implementations
|
if(nchars == -1) { // compatibility to old implementations
|
||||||
size *= 2;
|
size *= 2;
|
||||||
nchars = vsnprintf(p, size, fmt, args);
|
|
||||||
} else if (size < (size_t)nchars + 1) {
|
} else if (size < (size_t)nchars + 1) {
|
||||||
size = (size_t)nchars + 1;
|
size = (size_t)nchars + 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue