[vlc-devel] [PATCH 01/13] access/dcp: narrow scope of iteration variable
Filip Roséen
filip at atch.se
Tue Oct 11 20:06:13 CEST 2016
---
modules/access/dcp/dcpdecrypt.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/access/dcp/dcpdecrypt.cpp b/modules/access/dcp/dcpdecrypt.cpp
index bc51dd0..e7dcaa9 100644
--- a/modules/access/dcp/dcpdecrypt.cpp
+++ b/modules/access/dcp/dcpdecrypt.cpp
@@ -525,7 +525,6 @@ int RSAKey::readDER( unsigned char const* ps_data_der, size_t length )
struct tag_info tag_inf;
gcry_mpi_t key_params[8];
gcry_error_t err;
- int i;
/* parse the ASN1 structure */
if( parseTag( &ps_data_der, &length, &tag_inf )
@@ -539,7 +538,7 @@ int RSAKey::readDER( unsigned char const* ps_data_der, size_t length )
ps_data_der += tag_inf.length;
length -= tag_inf.length;
- for( i = 0; i < 8; i++ )
+ for( int i = 0; i < 8; i++ )
{
if( parseTag( &ps_data_der, &length, &tag_inf )
|| tag_inf.tag != TAG_INTEGER || tag_inf.class_ || tag_inf.cons || tag_inf.ndef )
@@ -575,7 +574,7 @@ int RSAKey::readDER( unsigned char const* ps_data_der, size_t length )
}
/* clear data */
- for( i = 0; i < 8; i++ )
+ for( int i = 0; i < 8; i++ )
gcry_mpi_release( key_params[i] );
return VLC_SUCCESS;
@@ -583,7 +582,7 @@ bad_asn1:
msg_Err( this->p_demux, "could not parse ASN1 structure; key might be corrupted" );
error:
- for( i = 0; i < 8; i++ )
+ for( int i = 0; i < 8; i++ )
gcry_mpi_release( key_params[i] );
return VLC_EGENERIC;
}
--
2.10.0
More information about the vlc-devel
mailing list