Page MenuHome GnuPG

Port parsing is broken in misc.c host_and_port_from_url
Closed, ResolvedPublic

Description

Here:
https://dev.gnupg.org/source/gnupg/browse/master/dirmngr/misc.c;0240345728a84d8f235ce05889e83963e52742eb$518

strchr (buf, ':') should be used instead of strchr (p, ':') - There is also NULL dereference if the URL does not contain '/' after the hostname with this code.

Revisions and Commits

Related Objects

Event Timeline

t8m created this object in space S1 Public.
werner added projects: dirmngr, LDAP.
werner added a subscriber: werner.

Oh, that is really old code dating back to dirmngr-1. There is only one user I will see whether I can replace it with the generic parser we have in http.c

werner claimed this task.

Fixed in master and 2.2.

The fix was too obvious. So I did not replace the code and to possibly introducing other bugs. Thanks.