mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
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>
This commit is contained in:
parent
fd4405747c
commit
f9be44c7e6
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user