diff options
author | Vitaly Chikunov <vt@altlinux.org> | 2021-02-01 23:04:08 +0300 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2021-02-01 20:04:08 +0000 |
commit | f9be44c7e6d90cb1fe3a0fbe3cc299ac783f0be8 (patch) | |
tree | b3f7f74875bdc4e60179c4dd3212f9749377174b /debug | |
parent | fd4405747c18463aad98877f277ab5d6eb54f78f (diff) | |
download | glibc-f9be44c7e6d90cb1fe3a0fbe3cc299ac783f0be8.zip glibc-f9be44c7e6d90cb1fe3a0fbe3cc299ac783f0be8.tar.gz glibc-f9be44c7e6d90cb1fe3a0fbe3cc299ac783f0be8.tar.bz2 |
libSegFault: Fix printing signal number [BZ #27249]
Signal number is written into the tail of buf, but printed from the
beginning, outputting garbage on the screen. Fix this by printing
from the correct position.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
Diffstat (limited to 'debug')
-rw-r--r-- | debug/segfault.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/debug/segfault.c b/debug/segfault.c index 0a6be8b..1873022 100644 --- a/debug/segfault.c +++ b/debug/segfault.c @@ -58,7 +58,7 @@ write_strsignal (int fd, int signal) char buf[30]; char *ptr = _itoa_word (signal, &buf[sizeof (buf)], 10, 0); WRITE_STRING ("signal "); - write (fd, buf, &buf[sizeof (buf)] - ptr); + write (fd, ptr, &buf[sizeof (buf)] - ptr); } |