mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
estream: Fix minor glitch in "%.*s" format.
* common/estream-printf.c (pr_string): Take care of non-nul terminated strings. -- Resolved conflicts: common/estream-printf.c - white spaces
This commit is contained in:
parent
505f0a642f
commit
998f085297
1 changed files with 96 additions and 94 deletions
|
@ -1143,7 +1143,9 @@ pr_string (estream_printf_out_t outfnc, void *outfncarg,
|
||||||
string = "(null)";
|
string = "(null)";
|
||||||
if (arg->precision >= 0)
|
if (arg->precision >= 0)
|
||||||
{
|
{
|
||||||
for (n=0,s=string; *s && n < arg->precision; s++)
|
/* Test for nul after N so that we can pass a non-nul terminated
|
||||||
|
string. */
|
||||||
|
for (n=0,s=string; n < arg->precision && *s; s++)
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue