aboutsummaryrefslogtreecommitdiffstats
path: root/g10/build-packet.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/build-packet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index 5772b13be..84912ac05 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -196,7 +196,8 @@ static int
do_user_id( IOBUF out, int ctb, PKT_user_id *uid )
{
write_header(out, ctb, uid->len);
- uid->stored_at = iobuf_tell( out ); /* what a hack */
+ uid->stored_at = iobuf_get_temp_length ( out ); /* what a hack ... */
+ /* ... and it does only work when used with a temp iobuf */
if( iobuf_write( out, uid->name, uid->len ) )
return GPGERR_WRITE_FILE;
return 0;