mirror of
git://git.gnupg.org/gnupg.git
synced 2025-05-24 16:43:28 +02:00
(modify_description): Don't increment OUT_LEN during
the second pass.
This commit is contained in:
parent
fce56851f0
commit
84282a9538
@ -1,3 +1,8 @@
|
|||||||
|
2005-02-15 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* findkey.c (modify_description): Don't increment OUT_LEN during
|
||||||
|
the second pass.
|
||||||
|
|
||||||
2005-02-14 Moritz Schulte <moritz@g10code.com>
|
2005-02-14 Moritz Schulte <moritz@g10code.com>
|
||||||
|
|
||||||
* command-ssh.c (es_read_byte): Renamed to ...
|
* command-ssh.c (es_read_byte): Renamed to ...
|
||||||
|
@ -179,18 +179,20 @@ modify_description (const char *in, const char *comment, char **result)
|
|||||||
switch (in[i])
|
switch (in[i])
|
||||||
{
|
{
|
||||||
case '%':
|
case '%':
|
||||||
out_len++;
|
|
||||||
if (out)
|
if (out)
|
||||||
*out++ = '%';
|
*out++ = '%';
|
||||||
|
else
|
||||||
|
out_len++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c': /* Comment. */
|
case 'c': /* Comment. */
|
||||||
out_len += comment_length;
|
if (out)
|
||||||
if (out && comment_length)
|
|
||||||
{
|
{
|
||||||
memcpy (out, comment, comment_length);
|
memcpy (out, comment, comment_length);
|
||||||
out += comment_length;
|
out += comment_length;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
out_len += comment_length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: /* Invalid special sequences are ignored. */
|
default: /* Invalid special sequences are ignored. */
|
||||||
@ -199,9 +201,10 @@ modify_description (const char *in, const char *comment, char **result)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
out_len++;
|
|
||||||
if (out)
|
if (out)
|
||||||
*out++ = in[i];
|
*out++ = in[i];
|
||||||
|
else
|
||||||
|
out_len++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user