public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix uninitialized variable in assert_perror (bug 22761)
@ 2018-01-31 19:29 Andreas Schwab
  2018-01-31 23:20 ` Florian Weimer
  2018-01-31 23:43 ` Dmitry V. Levin
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Schwab @ 2018-01-31 19:29 UTC (permalink / raw)
  To: libc-alpha

I wasn't able to get assert_perror to misbehave in an observable way.

	[BZ #22761]
	* assert/assert-perr.c (__assert_perror_fail): Append %n to format
	string.
---
 assert/assert-perr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/assert/assert-perr.c b/assert/assert-perr.c
index 002a5e8708..4b4fe883fd 100644
--- a/assert/assert-perr.c
+++ b/assert/assert-perr.c
@@ -32,7 +32,7 @@ __assert_perror_fail (int errnum,
   char errbuf[1024];
 
   char *e = __strerror_r (errnum, errbuf, sizeof errbuf);
-  __assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n"),
+  __assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n%n"),
 		      e, file, line, function);
 }
 libc_hidden_def (__assert_perror_fail)
-- 
2.16.1


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix uninitialized variable in assert_perror (bug 22761)
  2018-01-31 19:29 [PATCH] Fix uninitialized variable in assert_perror (bug 22761) Andreas Schwab
@ 2018-01-31 23:20 ` Florian Weimer
  2018-01-31 23:43 ` Dmitry V. Levin
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2018-01-31 23:20 UTC (permalink / raw)
  To: Andreas Schwab, libc-alpha

On 01/31/2018 10:55 AM, Andreas Schwab wrote:
> I wasn't able to get assert_perror to misbehave in an observable way.
> 
> 	[BZ #22761]
> 	* assert/assert-perr.c (__assert_perror_fail): Append %n to format
> 	string.

The patch looks good to me.  I'm not sure if it should go in so shortly 
before the release.

Thanks,
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix uninitialized variable in assert_perror (bug 22761)
  2018-01-31 19:29 [PATCH] Fix uninitialized variable in assert_perror (bug 22761) Andreas Schwab
  2018-01-31 23:20 ` Florian Weimer
@ 2018-01-31 23:43 ` Dmitry V. Levin
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry V. Levin @ 2018-01-31 23:43 UTC (permalink / raw)
  To: libc-alpha

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]

On Wed, Jan 31, 2018 at 10:55:44AM +0100, Andreas Schwab wrote:
> I wasn't able to get assert_perror to misbehave in an observable way.
> 
> 	[BZ #22761]
> 	* assert/assert-perr.c (__assert_perror_fail): Append %n to format
> 	string.
> ---
>  assert/assert-perr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/assert/assert-perr.c b/assert/assert-perr.c
> index 002a5e8708..4b4fe883fd 100644
> --- a/assert/assert-perr.c
> +++ b/assert/assert-perr.c
> @@ -32,7 +32,7 @@ __assert_perror_fail (int errnum,
>    char errbuf[1024];
>  
>    char *e = __strerror_r (errnum, errbuf, sizeof errbuf);
> -  __assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n"),
> +  __assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n%n"),
>  		      e, file, line, function);
>  }
>  libc_hidden_def (__assert_perror_fail)

The patch is obviously correct but it breaks translations.
How do we handle this before the release?


-- 
ldv

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-31 10:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31 19:29 [PATCH] Fix uninitialized variable in assert_perror (bug 22761) Andreas Schwab
2018-01-31 23:20 ` Florian Weimer
2018-01-31 23:43 ` Dmitry V. Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).