scotty-1.99.5 fails to decode large Counter values

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Mon, 8 May 1995 18:39:06 +0200

Hi!

Today, I found a bug in scotty-1.99.5 which affects large unsigned
Counter values. Below is a patch that will fix the problem. And as you
might have noticed, the Tkined patch for the postscript feature was in
reverse order. Sorry for all these silly problems,

Juergen

*** asn1.c-broken Thu May 4 17:07:34 1995
--- asn1.c Mon May 8 16:53:45 1995
***************
*** 377,384 ****
* Check for an overflow for normal 32 bit integer values.
*/

! while (asnlen > sizeof (int)) {
! sprintf (error,
"integer overflow: %d bytes received, %d bytes available",
asnlen, (int) sizeof (int));
return NULL;
--- 377,385 ----
* Check for an overflow for normal 32 bit integer values.
*/

! if ((*packet != 0 && asnlen > sizeof (int))
! || (*packet == 0 && asnlen-1 > sizeof (int))) {
! sprintf (error,
"integer overflow: %d bytes received, %d bytes available",
asnlen, (int) sizeof (int));
return NULL;