GpgME UID decoding bug?

Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de
Mon Jun 3 01:09:02 2002


On Sun, Jun 02, 2002 at 02:31:04PM +0200, Marc Mutz wrote:
> That's fixed by the attached patch to gpgme/key.c.

I applied it, thanks.
 
> However, this chunk of code (gpgme/key.c:630) seems buggy:
> Q>       else if (s[1] == 'x' && my_isdigit (s[2]) && my_isdigit (s[3]))
> where
> Q> #define my_isdigit(a) ((a) >='0' && (a) <= '9')
> 
> This even fails for the probably most often used case: \x3a (encoding 
> the colon for --with-colon listing).

It's obviously bogus, I have commited a fix.
 
> Oh, and it might be a good idea to refactor the de-escaping code into a 
> function of it's own, just for aesthetical reasons ;-)

Yeah, there are a couple of them, quite confusing.  Maybe at some time I get
to analyse which are used where ;)

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de