1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-23 10:29:58 +01:00

* hkp.c (hkp_ask_import, hkp_export, hkp_search): Make sure to allocate

space for the ":port" text in HKP URLs.
This commit is contained in:
David Shaw 2003-04-25 03:53:17 +00:00
parent 4b0f7e337f
commit 9b6afa4fab
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2003-04-24 David Shaw <dshaw@jabberwocky.com>
* hkp.c (hkp_ask_import, hkp_export, hkp_search): Make sure to
allocate space for the ":port" text in HKP URLs.
2003-04-23 Werner Koch <wk@gnupg.org>
Reverted recent changes in the copyright notices. We can't use a

View File

@ -71,7 +71,9 @@ hkp_ask_import( KEYDB_SEARCH_DESC *desc, void *stats_handle)
log_info(_("requesting key %08lX from %s\n"),
(ulong)key[1],opt.keyserver_uri);
request = m_alloc( strlen( opt.keyserver_host ) + 100 );
request = m_alloc( strlen( opt.keyserver_host )
+ (opt.keyserver_port?strlen(opt.keyserver_port):0)
+ 100 );
/* hkp does not accept the long keyid - we should really write a
* nicer one :-)
* FIXME: request binary mode - need to pass no_armor mode
@ -133,7 +135,9 @@ hkp_export( STRLIST users )
iobuf_flush_temp( temp );
request = m_alloc( strlen( opt.keyserver_host ) + 100 );
request = m_alloc( strlen( opt.keyserver_host )
+ (opt.keyserver_port?strlen(opt.keyserver_port):0)
+ 100 );
if(opt.keyserver_options.broken_http_proxy)
hflags |= HTTP_FLAG_NO_SHUTDOWN;
@ -545,7 +549,9 @@ int hkp_search(STRLIST tokens)
searchurl[len]='\0';
request=m_alloc(strlen(opt.keyserver_host) + 100 + strlen(searchurl));
request=m_alloc(strlen(opt.keyserver_host)
+ (opt.keyserver_port?strlen(opt.keyserver_port):0)
+ 100 + strlen(searchurl));
if(opt.keyserver_options.broken_http_proxy)
hflags |= HTTP_FLAG_NO_SHUTDOWN;