File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1006,22 +1006,24 @@ rfc1048_print(netdissect_options *ndo,
10061006 * URI: URI of the SZTP bootstrap server.
10071007 */
10081008 while (len >= 2 ) {
1009- suboptlen = GET_BE_U_2 (bp );
1009+ uint16_t suboptlen2 ;
1010+
1011+ suboptlen2 = GET_BE_U_2 (bp );
10101012 bp += 2 ;
10111013 len -= 2 ;
10121014 ND_PRINT ("\n\t " );
1013- ND_PRINT ("length %u: " , suboptlen );
1014- if (len < suboptlen ) {
1015+ ND_PRINT ("length %u: " , suboptlen2 );
1016+ if (len < suboptlen2 ) {
10151017 ND_PRINT ("length goes past end of option" );
10161018 bp += len ;
10171019 len = 0 ;
10181020 break ;
10191021 }
10201022 ND_PRINT ("\"" );
1021- nd_printjn (ndo , bp , suboptlen );
1023+ nd_printjn (ndo , bp , suboptlen2 );
10221024 ND_PRINT ("\"" );
1023- len -= suboptlen ;
1024- bp += suboptlen ;
1025+ len -= suboptlen2 ;
1026+ bp += suboptlen2 ;
10251027 }
10261028 if (len != 0 ) {
10271029 ND_PRINT ("[ERROR: length < 2 bytes]" );
You can’t perform that action at this time.
0 commit comments