Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Overrun  at crypt-sha1.c:251

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

sha1_finish

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/crypt/crypt-sha1.c)expand/collapse
Show more  
 263  void sha1_finish( sha1_context *ctx, guint8 digest[20] )
 264  {
 265      guint32 last, padn;
 266      guint32 high, low;
 267      guint8 msglen[8];
 268   
 269      high = ( ctx->total[0] >> 29 )
 270           | ( ctx->total[1] <<  3 );
 271      low  = ( ctx->total[0] <<  3 );
 272   
 273      PUT_UINT32( high, msglen, 0 );
 274      PUT_UINT32( low,  msglen, 4 );
 275   
 276      last = ctx->total[0] & 0x3F;
 277      padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
 278   
 279[+]     sha1_update( ctx, sha1_padding, padn );
expand/collapse

sha1_update

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/crypt/crypt-sha1.c)expand/collapse
Show more  
 216  void sha1_update( sha1_context *ctx, const guint8 *input, guint32 length )
 217  {
 218      guint32 left, fill;
 219   
 220      if( ! length ) return;
 221   
 222      left = ctx->total[0] & 0x3F;
 223      fill = 64 - left;
 224   
 225      ctx->total[0] += length;
 226      ctx->total[0] &= 0xFFFFFFFF;
 227   
 228      if( ctx->total[0] < length )
 229          ctx->total[1]++;
 230   
 231      if( left && length >= fill )
 232      {
 233          memcpy( (void *) (ctx->buffer + left),
 234                  (const void *) input, fill );
 235          sha1_process( ctx, ctx->buffer );
 236          length -= fill;
 237          input  += fill;
 238          left = 0;
 239      }
 240   
 241      while( length >= 64 )
 242      {
 243          sha1_process( ctx, input );
 244          length -= 64;
 245          input  += 64;
 246      }
 247   
 248      if( length )
 249      {
 250          memcpy( (void *) (ctx->buffer + left),
 251                  (const void *) input, length );
Show more  
Show more  




Change Warning 1098.29725 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: