diff options
-rw-r--r-- | ldso/ldso/dl-elf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index a788f8ebf..241d0222a 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -698,6 +698,9 @@ void _dl_dprintf(int fd, const char *fmt, ...) char *start, *ptr, *string; static char *buf; + if (!fmt) + return; + buf = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (_dl_mmap_check_error(buf)) { @@ -707,9 +710,6 @@ void _dl_dprintf(int fd, const char *fmt, ...) start = ptr = buf; - if (!fmt) - return; - if (_dl_strlen(fmt) >= (_dl_pagesize - 1)) { _dl_write(fd, "overflow\n", 11); _dl_exit(20); |