Bug in gpg 1.0.4
Werner Koch
wk@gnupg.org
Sat Apr 14 17:30:01 2001
On Sat, 14 Apr 2001, Keith Clayton wrote:
> I search the recent lists archives and didn't find this mentioned. My
> apologies if this bug has been detected and corrected. Encrypting to the
> following public key will cause gpg to segfault without fail on my system.
You are the first one to notice this. Here is a patch:
--- strgutil.c 2001/03/12 20:21:50 1.28.2.3
+++ strgutil.c 2001/04/14 15:26:01
@@ -453,11 +453,13 @@
case '\v': n++; if( p ) *p++ = 'v'; break;
case '\b': n++; if( p ) *p++ = 'b'; break;
case 0 : n++; if( p ) *p++ = '0'; break;
- default: n += 3;
- sprintf( p, "x%02x", *s );
- if ( p )
- p += 3;
- break;
+ default:
+ n += 3;
+ if ( p ) {
+ sprintf( p, "x%02x", *s );
+ p += 3;
+ }
+ break;
}
}
else {
Thanks,
Werner
--
Werner Koch Omnis enim res, quae dando non deficit, dum habetur
g10 Code GmbH et non datur, nondum habetur, quomodo habenda est.
Privacy Solutions -- Augustinus