~ubuntu-branches/ubuntu/precise/dropbear/precise

« back to all changes in this revision

Viewing changes to libtomcrypt/src/pk/asn1/der/bit/der_decode_bit_string.c

  • Committer: Bazaar Package Importer
  • Author(s): Gerrit Pape
  • Date: 2007-03-02 20:48:18 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070302204818-ozmbou2sbyj7dus5
Tags: 0.49-1
* new upstream release, fixes
  * CVE-2007-1099: dropbear dbclient insufficient warning on hostkey
    mismatch (closes: #412899).
  * dbclient uses static "Password:" prompt instead of using the server's
    prompt (closes: #394996).
* debian/control: Suggests: openssh-client, not ssh (closes: #405686);
  Standards-Version: 3.7.2.2.
* debian/README.Debian: ssh -> openssh-server, openssh-client; remove
  'Replacing OpenSSH "sshd" with Dropbear' part, this is simply done by not
  installing the openssh-server package.
* debian/README.runit: runsvstat -> sv status.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * The library is free for all purposes without any express
7
7
 * guarantee it works.
8
8
 *
9
 
 * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.org
 
9
 * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com
10
10
 */
11
11
#include "tomcrypt.h"
12
12
 
51
51
   /* get the length of the data */
52
52
   if (in[x] & 0x80) {
53
53
      /* long format get number of length bytes */
54
 
      y = in[x++] & 127;
 
54
      y = in[x++] & 0x7F;
55
55
 
56
56
      /* invalid if 0 or > 2 */
57
57
      if (y == 0 || y > 2) {
65
65
      }
66
66
   } else {
67
67
      /* short format */
68
 
      dlen = in[x++] & 127;
 
68
      dlen = in[x++] & 0x7F;
69
69
   }
70
70
  
71
71
   /* is the data len too long or too short? */
78
78
 
79
79
   /* too many bits? */
80
80
   if (blen > *outlen) {
 
81
      *outlen = blen;
81
82
      return CRYPT_BUFFER_OVERFLOW;
82
83
   }
83
84
 
97
98
#endif
98
99
 
99
100
/* $Source: /cvs/libtom/libtomcrypt/src/pk/asn1/der/bit/der_decode_bit_string.c,v $ */
100
 
/* $Revision: 1.1 $ */
101
 
/* $Date: 2005/05/16 15:08:11 $ */
 
101
/* $Revision: 1.4 $ */
 
102
/* $Date: 2006/06/16 21:53:41 $ */